From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXwtj-0001kH-EN for qemu-devel@nongnu.org; Mon, 22 Feb 2016 15:16:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXwtg-0006EV-7K for qemu-devel@nongnu.org; Mon, 22 Feb 2016 15:15:59 -0500 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:36832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXwtf-0006EH-J4 for qemu-devel@nongnu.org; Mon, 22 Feb 2016 15:15:56 -0500 Received: by mail-wm0-x22a.google.com with SMTP id g62so191187679wme.1 for ; Mon, 22 Feb 2016 12:15:55 -0800 (PST) References: <145574488321.6637.3923094874117473534.stgit@localhost> <87k2lw4wn8.fsf@fimbulvetr.bsc.es> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <87k2lw4wn8.fsf@fimbulvetr.bsc.es> Date: Mon, 22 Feb 2016 20:15:52 +0000 Message-ID: <87a8ms33if.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v7 0/4] trace: Show vCPU info in guest code events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Llu=C3=ADs?= Vilanova Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , Eduardo Habkost Lluís Vilanova writes: > Lluís Vilanova writes: > >> NOTE: This series should complete the framework for guest code tracing. From >> here on, other series can concurrently add actual events and improve the >> guest code tracing features and performance (e.g., control tracing >> independently on each vCPU). > >> This series introduces the "vcpu" property for tracing events. This property >> identifies events that are tied to a particular virtual CPU (e.g., executing an >> instruction). > >> Events with this property have an implicit vcpu argument, which is shown in the >> trace. In the case of events executed at TCG translation time, two implicit >> arguments are added: > >> * The vCPU performing the code translation (shown in the translation-time trace) >> * The vCPU executing the translated code (shown in the execution-time trace) > >> Note that the "vcpu" and "tcg" properties are not merged into a single one, >> since events can be defined that relate to a vCPU but are never raised from TCG >> code (e.g., interrupts). > > Hi, > > I guess it's been a hectic time to integrate patches, but I haven't received a > comment on the tracing part since v4. If possible, I'd like to send an actual > guest code event (vmem accesses) before the soft-freeze (once this series is > accepted). I don't see a reason you couldn't post a v8 of this series including the actual use. It would help to see it being used in the wild and the maintainer doesn't have to accept the whole series straight away. > > > Cheers, > Lluis > > >> Changes in v7 >> ============= > >> * Fix the modified event copying code. >> * Minor fix in commit message for patch 3. > > >> Changes in v6 >> ============= > >> * Rebase on 84c0781. >> * Replace the added 'TCGv_cpu' type for 'TCGv_env', since the users are really >> pointing to 'CPUArchState'. >> * Add functions to simplify event argument management. >> * Add minor event copy cleanup (remove long "event.original.original" chains). >> * Make it easier to change arguments injected by the 'vcpu' property. > > >> Changes in v5 >> ============= > >> * Rebase on 357e81c. >> * Split from the previous (larger and more complex) v4 series. Ahh I see it used to be. Perhaps maybe point to a public tree with the example use? > > >> Changes in v4 >> ============= > >> * Fix typo in commit message (Stefan Hajnoczi). >> * Simplify per-vCPU tracing state initialization (Stefan Hajnoczi). >> * Update copyright years. > > >> Changes in v3 >> ============= > >> * Update QAPI version (Eric Blake). >> * Fix '#optional' annotation in QAPI (Eric Blake). > > >> Changes in v2 >> ============= > >> * Rebase on 5522a84. >> * Improve patch descriptions. >> * Refactor code generation into a separate patch. >> * Fix forward declarations (Stefan Hajnoczi & Eduardo Habkost). >> * Fix "since" tags in QAPI interface (Eric Blake). >> * Unify QAPI/QMP interface with an optional 'vcpu' argument (Eric Blake). >> * Fix QMP+GTK header workaround (Stefan Hajnoczi). > > >> Signed-off-by: Lluís Vilanova >> Acked-by: Stefan Hajnoczi >> --- > >> Lluís Vilanova (4): >> trace: Extend API to manage event arguments >> trace: Remove unnecessary intermediate event copies >> tcg: Add type for vCPU pointers >> trace: Add 'vcpu' event property to trace guest vCPU > > >> docs/tracing.txt | 41 +++++++++++++ >> include/qemu/typedefs.h | 1 >> scripts/tracetool/__init__.py | 31 ++++++++-- >> scripts/tracetool/format/events_h.py | 4 + >> scripts/tracetool/format/h.py | 3 + >> scripts/tracetool/format/tcg_h.py | 33 +++++++---- >> scripts/tracetool/format/tcg_helper_c.py | 35 +++++++++-- >> scripts/tracetool/format/tcg_helper_h.py | 7 +- >> scripts/tracetool/format/tcg_helper_wrapper_h.py | 5 +- >> scripts/tracetool/format/ust_events_c.py | 1 >> scripts/tracetool/transform.py | 4 + >> scripts/tracetool/vcpu.py | 69 ++++++++++++++++++++++ >> target-alpha/translate.c | 2 - >> target-arm/translate.c | 2 - >> target-arm/translate.h | 2 - >> target-cris/translate.c | 2 - >> target-i386/translate.c | 2 - >> target-lm32/translate.c | 2 - >> target-m68k/translate.c | 2 - >> target-microblaze/translate.c | 2 - >> target-mips/translate.c | 2 - >> target-moxie/translate.c | 2 - >> target-openrisc/translate.c | 2 - >> target-ppc/translate.c | 2 - >> target-s390x/translate.c | 2 - >> target-sh4/translate.c | 2 - >> target-sparc/translate.c | 5 +- >> target-tilegx/translate.c | 2 - >> target-tricore/translate.c | 2 - >> target-unicore32/translate.c | 2 - >> target-xtensa/translate.c | 2 - >> tcg/tcg.h | 1 >> trace/control.h | 3 + >> 33 files changed, 224 insertions(+), 55 deletions(-) >> create mode 100644 scripts/tracetool/vcpu.py > > >> To: qemu-devel@nongnu.org >> Cc: Stefan Hajnoczi >> Cc: Eduardo Habkost >> Cc: Eric Blake >> Cc: Alex Bennée -- Alex Bennée