From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLYDA-0003Bw-0b for qemu-devel@nongnu.org; Thu, 06 Mar 2014 08:19:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLYD5-0005vi-7Z for qemu-devel@nongnu.org; Thu, 06 Mar 2014 08:19:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLYD4-0005vc-Vk for qemu-devel@nongnu.org; Thu, 06 Mar 2014 08:19:39 -0500 From: Juan Quintela In-Reply-To: <531852E0.60805@huawei.com> (Gonglei's message of "Thu, 6 Mar 2014 18:50:08 +0800") References: <33183CC9F5247A488A2544077AF19020815D2278@SZXEMA503-MBS.china.huawei.com> <87ob1kr53u.fsf@elfo.mitica> <531852E0.60805@huawei.com> Date: Thu, 06 Mar 2014 14:19:25 +0100 Message-ID: <877g87mplu.fsf@elfo.mitica> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/7] migration: Add counters of updating the dirty bitmap Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gonglei Cc: Peter Maydell , "chenliang (T)" , "pl@kamp.de" , "qemu-devel@nongnu.org" , "owasserm@redhat.com" , "aliguori@amazon.com" , "pbonzini@redhat.com" Gonglei wrote: > On 2014/3/6 0:18, Juan Quintela wrote: > >> "Gonglei (Arei)" wrote: >>> Add counters to log the times of updating the dirty bitmap. >>> >>> Signed-off-by: ChenLiang >>> Signed-off-by: Gonglei >> >> 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.