mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
fe10ab540b
commit
bc72ad6754
121 changed files with 678 additions and 678 deletions
16
migration.c
16
migration.c
|
@ -198,7 +198,7 @@ MigrationInfo *qmp_query_migrate(Error **errp)
|
|||
info->has_status = true;
|
||||
info->status = g_strdup("active");
|
||||
info->has_total_time = true;
|
||||
info->total_time = qemu_get_clock_ms(rt_clock)
|
||||
info->total_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME)
|
||||
- s->total_time;
|
||||
info->has_expected_downtime = true;
|
||||
info->expected_downtime = s->expected_downtime;
|
||||
|
@ -376,7 +376,7 @@ static MigrationState *migrate_init(const MigrationParams *params)
|
|||
s->state = MIG_STATE_SETUP;
|
||||
trace_migrate_set_state(MIG_STATE_SETUP);
|
||||
|
||||
s->total_time = qemu_get_clock_ms(rt_clock);
|
||||
s->total_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -545,8 +545,8 @@ int64_t migrate_xbzrle_cache_size(void)
|
|||
static void *migration_thread(void *opaque)
|
||||
{
|
||||
MigrationState *s = opaque;
|
||||
int64_t initial_time = qemu_get_clock_ms(rt_clock);
|
||||
int64_t setup_start = qemu_get_clock_ms(host_clock);
|
||||
int64_t initial_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
|
||||
int64_t setup_start = qemu_clock_get_ms(QEMU_CLOCK_HOST);
|
||||
int64_t initial_bytes = 0;
|
||||
int64_t max_size = 0;
|
||||
int64_t start_time = initial_time;
|
||||
|
@ -555,7 +555,7 @@ static void *migration_thread(void *opaque)
|
|||
DPRINTF("beginning savevm\n");
|
||||
qemu_savevm_state_begin(s->file, &s->params);
|
||||
|
||||
s->setup_time = qemu_get_clock_ms(host_clock) - setup_start;
|
||||
s->setup_time = qemu_clock_get_ms(QEMU_CLOCK_HOST) - setup_start;
|
||||
migrate_set_state(s, MIG_STATE_SETUP, MIG_STATE_ACTIVE);
|
||||
|
||||
DPRINTF("setup complete\n");
|
||||
|
@ -575,7 +575,7 @@ static void *migration_thread(void *opaque)
|
|||
|
||||
DPRINTF("done iterating\n");
|
||||
qemu_mutex_lock_iothread();
|
||||
start_time = qemu_get_clock_ms(rt_clock);
|
||||
start_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
|
||||
qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);
|
||||
old_vm_running = runstate_is_running();
|
||||
|
||||
|
@ -602,7 +602,7 @@ static void *migration_thread(void *opaque)
|
|||
migrate_set_state(s, MIG_STATE_ACTIVE, MIG_STATE_ERROR);
|
||||
break;
|
||||
}
|
||||
current_time = qemu_get_clock_ms(rt_clock);
|
||||
current_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
|
||||
if (current_time >= initial_time + BUFFER_DELAY) {
|
||||
uint64_t transferred_bytes = qemu_ftell(s->file) - initial_bytes;
|
||||
uint64_t time_spent = current_time - initial_time;
|
||||
|
@ -633,7 +633,7 @@ static void *migration_thread(void *opaque)
|
|||
|
||||
qemu_mutex_lock_iothread();
|
||||
if (s->state == MIG_STATE_COMPLETED) {
|
||||
int64_t end_time = qemu_get_clock_ms(rt_clock);
|
||||
int64_t end_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
|
||||
s->total_time = end_time - s->total_time;
|
||||
s->downtime = end_time - start_time;
|
||||
runstate_set(RUN_STATE_POSTMIGRATE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue