Received: from eggs.gnu.org ([2001:4830:134:3::10]:37608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVbuH-0007AF-6I for qemu-devel@nongnu.org; Wed, 11 Mar 2015 04:22:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVbuC-0007Gw-Cq for qemu-devel@nongnu.org; Wed, 11 Mar 2015 04:22:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVbuC-0007Gm-4B for qemu-devel@nongnu.org; Wed, 11 Mar 2015 04:22:16 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2B8MFeq023398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 11 Mar 2015 04:22:15 -0400 From: Markus Armbruster References: <1425988051-65333-1-git-send-email-pbonzini@redhat.com> Date: Wed, 11 Mar 2015 09:13:59 +0100 In-Reply-To: <1425988051-65333-1-git-send-email-pbonzini@redhat.com> (Paolo Bonzini's message of "Tue, 10 Mar 2015 12:47:31 +0100") Message-ID: <87egowrlx4.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] tcg/monitor: remove "info profile" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Paolo Bonzini writes: > "info profile" is not great in several ways: > > 1) half of it only works for TCG, but doesn't say this anywhere. > > 2) the division by get_ticks_per_sec() doesn't work since the unit of > measurement is clock cycles rather than nanoseconds. (Broken since 2006 > by Fabrice). > > 3) you really can get the same information from "top" now that we have > VCPU threads. > > 4) It declares non-existing extern variables qemu_time_start and > tlb_flush_time, the latter of which has never existed _at all_ in the > code base. > > Let's remove and leave the remaining TCG dump/profiling functionality that > is keyed off --enable-profiler. This "fixes" the conflict between the > qemu_time() function and the qemu_time variable used by "info profile". I'd appreciate a brief hint at what the "remaining TCG dump/profiling functionality" is here. > > Signed-off-by: Paolo Bonzini > --- > cpus.c | 9 --------- > include/qemu/timer.h | 4 ---- > monitor.c | 28 ---------------------------- > vl.c | 9 --------- > 4 files changed, 50 deletions(-) [...] > diff --git a/include/qemu/timer.h b/include/qemu/timer.h > index eba8b21..cc74a30 100644 > --- a/include/qemu/timer.h > +++ b/include/qemu/timer.h > @@ -1001,10 +1001,6 @@ static inline int64_t profile_getclock(void) #ifdef CONFIG_PROFILER static inline int64_t profile_getclock(void) > { > return cpu_get_real_ticks(); > } > - > -extern int64_t qemu_time, qemu_time_start; > -extern int64_t tlb_flush_time; > -extern int64_t dev_time; > #endif > > #endif I can't help to wonder what wrapping profile_getclock() around cpu_get_real_ticks() buys us. [...] With or without the suggested commit message improvement: Reviewed-by: Markus Armbruster