This patch adds calls to replay functions into the icount setup block. In record mode number of executed instructions is written to the log. In replay mode number of istructions to execute is taken from the replay log. When replayed instructions counter is expired qemu_notify_event() function is called to wake up the iothread. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162405.8676.31890.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
31 lines
746 B
C
31 lines
746 B
C
#ifndef REPLAY_H
|
|
#define REPLAY_H
|
|
|
|
/*
|
|
* replay.h
|
|
*
|
|
* Copyright (c) 2010-2015 Institute for System Programming
|
|
* of the Russian Academy of Sciences.
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*
|
|
*/
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include "qapi-types.h"
|
|
|
|
extern ReplayMode replay_mode;
|
|
|
|
/* Processing the instructions */
|
|
|
|
/*! Returns number of executed instructions. */
|
|
uint64_t replay_get_current_step(void);
|
|
/*! Returns number of instructions to execute in replay mode. */
|
|
int replay_get_instructions(void);
|
|
/*! Updates instructions counter in replay mode. */
|
|
void replay_account_executed_instructions(void);
|
|
|
|
#endif
|