Gonglei <arei.gong...@huawei.com> wrote: > On 2014/3/6 0:18, Juan Quintela wrote: > >> "Gonglei (Arei)" <arei.gong...@huawei.com> wrote: >>> Add counters to log the times of updating the dirty bitmap. >>> >>> Signed-off-by: ChenLiang <chenlian...@huawei.com> >>> Signed-off-by: Gonglei <arei.gong...@huawei.com> >> >> As told by Eric, I am with this change, but can we move the code to the >> same place that the rest of the statistics? >> >> Thanks, Juan. > > OK, I'm pleasure to do it. What's your plan?
Instead of a local variable, look at includemigration/state/migration.h inside MigrationState there are variables like setup_time. You can add your variable there. Interesting bits is that you need to add it also to: qapi-schema.json: MigrationInfo (looks for @setup-time), qmp-commands.hx: look for setup-time hmp.c: look again for setup_time migration.c: look for setup_time inside qemu_qeery_migrate() That are the places to add something to migration stats and that appears everywhere. Thanks, Juan.