From nobody Sun Feb 8 23:37:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1485956827113363.47586670757505; Wed, 1 Feb 2017 05:47:07 -0800 (PST) Received: from localhost ([::1]:51058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvFY-0007Tw-6L for importer@patchew.org; Wed, 01 Feb 2017 08:47:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvDX-0006Id-56 for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvDV-0004gM-Lm for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:44:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55128) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvDV-0004fC-Cf for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:44:57 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81BDCC04B92A; Wed, 1 Feb 2017 13:44:57 +0000 (UTC) Received: from localhost (ovpn-116-240.ams2.redhat.com [10.36.116.240]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11Diu6M024726; Wed, 1 Feb 2017 08:44:56 -0500 From: Stefan Hajnoczi To: Date: Wed, 1 Feb 2017 13:44:44 +0000 Message-Id: <20170201134453.11963-2-stefanha@redhat.com> In-Reply-To: <20170201134453.11963-1-stefanha@redhat.com> References: <20170201134453.11963-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 01 Feb 2017 13:44:57 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 01/10] make: move top level dir to end of include search path X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" Currently the search path is 1. source dir corresponding to input file (implicit by compiler) 2. top level build dir 3. top level source dir 4. top level source include/ dir 5. source dir corresponding to input file 6. build dir corresponding to output file Search item 5 is an effective no-op, since it duplicates item 1. When srcdir =3D=3D builddir, item 6 also duplicates item 1, which causes a semantic difference between VPATH and non-VPATH builds. Thus to ensure consistent semantics we need item 6 to be present immediately after item 1. e.g. 1. source dir corresponding to input file (implicit by compiler) 2. build dir corresponding to output file 3. top level build dir 4. top level source dir 5. top level source include/ dir When srcdir =3D=3D builddir, items 1 & 2 collapse into one, and items 3 & 4 collapse into one, but the overall search order is still consistent with srcdir !=3D builddir A further complication is that while most of the source files are built with a current directory of $BUILD_DIR, target dependant files are built with a current directory of $BUILD_DIR/$TARGET. As a result, search item 2 resolves to a different location for target independant vs target dependant files. For example when building 'migration/ram.o', the use of '-I$(@D)' (which expands to '-Imigration') would not find '$BUILD_DIR/migration', but rather '$BUILD_DIR/$TARGET/migration'. If there are generated headers files to be used by the migration code in '$BUILD_DIR/migration', these will not be found by the relative include, an absolute include is needed instead. This has not been a problem so far, since nothing has been generating headers in sub-dirs, but the trace code will shortly be doing that. So it is needed to list '-I$(BUILD_DIR)/$(@D)' as well as '-I$(@D)' to ensure both directories are searched when building target dependant code. So the search order ends up being: 1. source dir corresponding to input file (implicit by compiler) 2. build dir corresponding to output file (absolute) 3. build dir corresponding to output file (relative to cwd) 4. top level build dir 5. top level source dir 6. top level source include/ dir One final complication is that the absolute '-I$(BUILD_DIR)/$(@D)' will sometimes end up pointing to a non-existant directory if that sub-dir does not have any target-independant files to be built. Rather than try to dynamically filter this, a simple 'mkdir' ensures $(BUILD_DIR)/$(@D) is guaranteed to exist at all times. Signed-off-by: Daniel P. Berrange Reviewed-by: Eric Blake Message-id: 20170125161417.31949-2-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- rules.mak | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/rules.mak b/rules.mak index d5c516c..575a3af 100644 --- a/rules.mak +++ b/rules.mak @@ -26,8 +26,13 @@ QEMU_CXXFLAGS =3D -D__STDC_LIMIT_MACROS $(filter-out -Ws= trict-prototypes -Wmissing # Flags for dependency generation QEMU_DGFLAGS +=3D -MMD -MP -MT $@ -MF $(@D)/$(*F).d =20 -# Same as -I$(SRC_PATH) -I., but for the nested source/object directories -QEMU_INCLUDES +=3D -I$( Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1485956825538302.9525666219181; Wed, 1 Feb 2017 05:47:05 -0800 (PST) Received: from localhost ([::1]:51059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvFW-0007Uj-6u for importer@patchew.org; Wed, 01 Feb 2017 08:47:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvDY-0006Ie-Et for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvDX-0004he-IO for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55142) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvDX-0004gY-CZ for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:44:59 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 72E41C04B332; Wed, 1 Feb 2017 13:44:59 +0000 (UTC) Received: from localhost (ovpn-116-240.ams2.redhat.com [10.36.116.240]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11Diw4Z029020; Wed, 1 Feb 2017 08:44:58 -0500 From: Stefan Hajnoczi To: Date: Wed, 1 Feb 2017 13:44:45 +0000 Message-Id: <20170201134453.11963-3-stefanha@redhat.com> In-Reply-To: <20170201134453.11963-1-stefanha@redhat.com> References: <20170201134453.11963-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 01 Feb 2017 13:44:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 02/10] trace: move hw/block/dataplane events to correct subdir X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" The trace-events for a given source file should generally always live in the same directory as the source file. Reviewed-by: Stefan Hajnoczi Signed-off-by: Daniel P. Berrange Message-id: 20170125161417.31949-3-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- Makefile.objs | 1 + hw/block/dataplane/trace-events | 6 ++++++ hw/block/trace-events | 5 ----- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 hw/block/dataplane/trace-events diff --git a/Makefile.objs b/Makefile.objs index 01cef86..babbc4e 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -125,6 +125,7 @@ trace-events-y +=3D io/trace-events trace-events-y +=3D migration/trace-events trace-events-y +=3D block/trace-events trace-events-y +=3D hw/block/trace-events +trace-events-y +=3D hw/block/dataplane/trace-events trace-events-y +=3D hw/char/trace-events trace-events-y +=3D hw/intc/trace-events trace-events-y +=3D hw/net/trace-events diff --git a/hw/block/dataplane/trace-events b/hw/block/dataplane/trace-eve= nts new file mode 100644 index 0000000..13f5dbb --- /dev/null +++ b/hw/block/dataplane/trace-events @@ -0,0 +1,6 @@ +# See docs/tracing.txt for syntax documentation. + +# hw/block/dataplane/virtio-blk.c +virtio_blk_data_plane_start(void *s) "dataplane %p" +virtio_blk_data_plane_stop(void *s) "dataplane %p" +virtio_blk_data_plane_process_request(void *s, unsigned int out_num, unsig= ned int in_num, unsigned int head) "dataplane %p out_num %u in_num %u head = %u" diff --git a/hw/block/trace-events b/hw/block/trace-events index d0dd94f..65e83dc 100644 --- a/hw/block/trace-events +++ b/hw/block/trace-events @@ -7,11 +7,6 @@ virtio_blk_handle_write(void *req, uint64_t sector, size_t= nsectors) "req %p sec virtio_blk_handle_read(void *req, uint64_t sector, size_t nsectors) "req %= p sector %"PRIu64" nsectors %zu" virtio_blk_submit_multireq(void *mrb, int start, int num_reqs, uint64_t of= fset, size_t size, bool is_write) "mrb %p start %d num_reqs %d offset %"PRI= u64" size %zu is_write %d" =20 -# hw/block/dataplane/virtio-blk.c -virtio_blk_data_plane_start(void *s) "dataplane %p" -virtio_blk_data_plane_stop(void *s) "dataplane %p" -virtio_blk_data_plane_process_request(void *s, unsigned int out_num, unsig= ned int in_num, unsigned int head) "dataplane %p out_num %u in_num %u head = %u" - # hw/block/hd-geometry.c hd_geometry_lchs_guess(void *blk, int cyls, int heads, int secs) "blk %p L= CHS %d %d %d" hd_geometry_guess(void *blk, uint32_t cyls, uint32_t heads, uint32_t secs,= int trans) "blk %p CHS %u %u %u trans %d" --=20 2.9.3 From nobody Sun Feb 8 23:37:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1485956829301972.6340428425868; Wed, 1 Feb 2017 05:47:09 -0800 (PST) Received: from localhost ([::1]:51060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvFb-0007Wl-Cy for importer@patchew.org; Wed, 01 Feb 2017 08:47:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvDa-0006K9-Oi for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvDZ-0004jG-D8 for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56428) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvDZ-0004ie-5P for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:01 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4CA37883A4; Wed, 1 Feb 2017 13:45:01 +0000 (UTC) Received: from localhost (ovpn-116-240.ams2.redhat.com [10.36.116.240]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11Dj0Bb025911; Wed, 1 Feb 2017 08:45:00 -0500 From: Stefan Hajnoczi To: Date: Wed, 1 Feb 2017 13:44:46 +0000 Message-Id: <20170201134453.11963-4-stefanha@redhat.com> In-Reply-To: <20170201134453.11963-1-stefanha@redhat.com> References: <20170201134453.11963-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 01 Feb 2017 13:45:01 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 03/10] trace: move hw/xen events to correct subdir X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" The trace-events for a given source file should generally always live in the same directory as the source file. Reviewed-by: Stefan Hajnoczi Signed-off-by: Daniel P. Berrange Message-id: 20170125161417.31949-4-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- Makefile.objs | 1 + hw/xen/trace-events | 13 +++++++++++++ trace-events | 10 ---------- 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 hw/xen/trace-events diff --git a/Makefile.objs b/Makefile.objs index babbc4e..9ac11e7 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -152,6 +152,7 @@ trace-events-y +=3D hw/vfio/trace-events trace-events-y +=3D hw/acpi/trace-events trace-events-y +=3D hw/arm/trace-events trace-events-y +=3D hw/alpha/trace-events +trace-events-y +=3D hw/xen/trace-events trace-events-y +=3D ui/trace-events trace-events-y +=3D audio/trace-events trace-events-y +=3D net/trace-events diff --git a/hw/xen/trace-events b/hw/xen/trace-events new file mode 100644 index 0000000..c4fb6f1 --- /dev/null +++ b/hw/xen/trace-events @@ -0,0 +1,13 @@ +# See docs/tracing.txt for syntax documentation. + +# include/hw/xen/xen_common.h +xen_default_ioreq_server(void) "" +xen_ioreq_server_create(uint32_t id) "id: %u" +xen_ioreq_server_destroy(uint32_t id) "id: %u" +xen_ioreq_server_state(uint32_t id, bool enable) "id: %u: enable: %i" +xen_map_mmio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) "i= d: %u start: %#"PRIx64" end: %#"PRIx64 +xen_unmap_mmio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) = "id: %u start: %#"PRIx64" end: %#"PRIx64 +xen_map_portio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) = "id: %u start: %#"PRIx64" end: %#"PRIx64 +xen_unmap_portio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr= ) "id: %u start: %#"PRIx64" end: %#"PRIx64 +xen_map_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id: %= u bdf: %02x.%02x.%02x" +xen_unmap_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id:= %u bdf: %02x.%02x.%02x" diff --git a/trace-events b/trace-events index 839a9d0..05ac6ac 100644 --- a/trace-events +++ b/trace-events @@ -62,16 +62,6 @@ spice_vmc_event(int event) "spice vmc event %d" # xen-hvm.c xen_ram_alloc(unsigned long ram_addr, unsigned long size) "requested: %#lx= , size %#lx" xen_client_set_memory(uint64_t start_addr, unsigned long size, bool log_di= rty) "%#"PRIx64" size %#lx, log_dirty %i" -xen_default_ioreq_server(void) "" -xen_ioreq_server_create(uint32_t id) "id: %u" -xen_ioreq_server_destroy(uint32_t id) "id: %u" -xen_ioreq_server_state(uint32_t id, bool enable) "id: %u: enable: %i" -xen_map_mmio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) "i= d: %u start: %#"PRIx64" end: %#"PRIx64 -xen_unmap_mmio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) = "id: %u start: %#"PRIx64" end: %#"PRIx64 -xen_map_portio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) = "id: %u start: %#"PRIx64" end: %#"PRIx64 -xen_unmap_portio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr= ) "id: %u start: %#"PRIx64" end: %#"PRIx64 -xen_map_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id: %= u bdf: %02x.%02x.%02x" -xen_unmap_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id:= %u bdf: %02x.%02x.%02x" handle_ioreq(void *req, uint32_t type, uint32_t dir, uint32_t df, uint32_t= data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) = "I/O=3D%p type=3D%d dir=3D%d df=3D%d ptr=3D%d port=3D%#"PRIx64" data=3D%#"P= RIx64" count=3D%d size=3D%d" handle_ioreq_read(void *req, uint32_t type, uint32_t df, uint32_t data_is_= ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=3D%p= read type=3D%d df=3D%d ptr=3D%d port=3D%#"PRIx64" data=3D%#"PRIx64" count= =3D%d size=3D%d" handle_ioreq_write(void *req, uint32_t type, uint32_t df, uint32_t data_is= _ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=3D%= p write type=3D%d df=3D%d ptr=3D%d port=3D%#"PRIx64" data=3D%#"PRIx64" coun= t=3D%d size=3D%d" --=20 2.9.3 From nobody Sun Feb 8 23:37:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1485956833368573.7490770724337; Wed, 1 Feb 2017 05:47:13 -0800 (PST) Received: from localhost ([::1]:51061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvFe-0007Zm-5v for importer@patchew.org; Wed, 01 Feb 2017 08:47:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvDc-0006Lb-3k for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvDb-0004k7-6V for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32966) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvDb-0004jw-0i for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:03 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 16A734621C; Wed, 1 Feb 2017 13:45:03 +0000 (UTC) Received: from localhost (ovpn-116-240.ams2.redhat.com [10.36.116.240]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11Dj14e025942; Wed, 1 Feb 2017 08:45:02 -0500 From: Stefan Hajnoczi To: Date: Wed, 1 Feb 2017 13:44:47 +0000 Message-Id: <20170201134453.11963-5-stefanha@redhat.com> In-Reply-To: <20170201134453.11963-1-stefanha@redhat.com> References: <20170201134453.11963-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 01 Feb 2017 13:45:03 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 04/10] trace: move hw/i386/xen events to correct subdir X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" The trace-events for a given source file should generally always live in the same directory as the source file. Reviewed-by: Stefan Hajnoczi Signed-off-by: Daniel P. Berrange Message-id: 20170125161417.31949-5-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- Makefile.objs | 1 + hw/i386/trace-events | 7 ------- hw/i386/xen/trace-events | 6 ++++++ 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 hw/i386/xen/trace-events diff --git a/Makefile.objs b/Makefile.objs index 9ac11e7..6abe0b9 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -144,6 +144,7 @@ trace-events-y +=3D hw/sd/trace-events trace-events-y +=3D hw/isa/trace-events trace-events-y +=3D hw/mem/trace-events trace-events-y +=3D hw/i386/trace-events +trace-events-y +=3D hw/i386/xen/trace-events trace-events-y +=3D hw/9pfs/trace-events trace-events-y +=3D hw/ppc/trace-events trace-events-y +=3D hw/pci/trace-events diff --git a/hw/i386/trace-events b/hw/i386/trace-events index d2b4973..a3568ee 100644 --- a/hw/i386/trace-events +++ b/hw/i386/trace-events @@ -1,12 +1,5 @@ # See docs/tracing.txt for syntax documentation. =20 -# hw/i386/xen/xen_platform.c -xen_platform_log(char *s) "xen platform: %s" - -# hw/i386/xen/xen_pvdevice.c -xen_pv_mmio_read(uint64_t addr) "WARNING: read from Xen PV Device MMIO spa= ce (address %"PRIx64")" -xen_pv_mmio_write(uint64_t addr) "WARNING: write to Xen PV Device MMIO spa= ce (address %"PRIx64")" - # hw/i386/x86-iommu.c x86_iommu_iec_notify(bool global, uint32_t index, uint32_t mask) "Notify I= EC invalidation: global=3D%d index=3D%" PRIu32 " mask=3D%" PRIu32 =20 diff --git a/hw/i386/xen/trace-events b/hw/i386/xen/trace-events new file mode 100644 index 0000000..321fe60 --- /dev/null +++ b/hw/i386/xen/trace-events @@ -0,0 +1,6 @@ +# hw/i386/xen/xen_platform.c +xen_platform_log(char *s) "xen platform: %s" + +# hw/i386/xen/xen_pvdevice.c +xen_pv_mmio_read(uint64_t addr) "WARNING: read from Xen PV Device MMIO spa= ce (address %"PRIx64")" +xen_pv_mmio_write(uint64_t addr) "WARNING: write to Xen PV Device MMIO spa= ce (address %"PRIx64")" --=20 2.9.3 From nobody Sun Feb 8 23:37:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1485957266811283.33817067929783; Wed, 1 Feb 2017 05:54:26 -0800 (PST) Received: from localhost ([::1]:51096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvMd-0006kS-B1 for importer@patchew.org; Wed, 01 Feb 2017 08:54:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvDe-0006Ng-Pz for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvDd-0004kY-61 for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56446) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvDc-0004kQ-Th for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:05 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 06BE47E9CD; Wed, 1 Feb 2017 13:45:05 +0000 (UTC) Received: from localhost (ovpn-116-240.ams2.redhat.com [10.36.116.240]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11Dj3sB024853; Wed, 1 Feb 2017 08:45:04 -0500 From: Stefan Hajnoczi To: Date: Wed, 1 Feb 2017 13:44:48 +0000 Message-Id: <20170201134453.11963-6-stefanha@redhat.com> In-Reply-To: <20170201134453.11963-1-stefanha@redhat.com> References: <20170201134453.11963-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 01 Feb 2017 13:45:05 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 05/10] trace: move setting of group name into Makefiles X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" Having tracetool.py figure out the right group name from just the input filename is not practical when considering the different build vs src path combinations. Instead simply take the group name as a command line arg from the Makefile, which can trivially provide the right name. Reviewed-by: Stefan Hajnoczi Signed-off-by: Daniel P. Berrange Message-id: 20170125161417.31949-6-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- Makefile.target | 3 +++ trace/Makefile.objs | 9 +++++++++ scripts/tracetool.py | 23 +++++++++-------------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/Makefile.target b/Makefile.target index fa2b151..fa6ae0c 100644 --- a/Makefile.target +++ b/Makefile.target @@ -50,6 +50,7 @@ endif =20 $(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace-events-all $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dstap \ --backends=3D$(TRACE_BACKENDS) \ --binary=3D$(bindir)/$(QEMU_PROG) \ @@ -59,6 +60,7 @@ $(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace-events-all =20 $(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dstap \ --backends=3D$(TRACE_BACKENDS) \ --binary=3D$(realpath .)/$(QEMU_PROG) \ @@ -68,6 +70,7 @@ $(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all =20 $(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace-events-all $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dsimpletrace-stap \ --backends=3D$(TRACE_BACKENDS) \ --probe-prefix=3Dqemu.$(TARGET_TYPE).$(TARGET_NAME) \ diff --git a/trace/Makefile.objs b/trace/Makefile.objs index 1e1ce74..d3b47da 100644 --- a/trace/Makefile.objs +++ b/trace/Makefile.objs @@ -20,6 +20,7 @@ $(obj)/generated-ust-provider.h: $(obj)/generated-ust-pro= vider.h-timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ $(obj)/generated-ust-provider.h-timestamp: $(BUILD_DIR)/trace-events-all $= (tracetool-y) $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dust-events-h \ --backends=3D$(TRACE_BACKENDS) \ $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") @@ -28,6 +29,7 @@ $(obj)/generated-ust.c: $(obj)/generated-ust.c-timestamp = $(BUILD_DIR)/config-hos @cmp $< $@ >/dev/null 2>&1 || cp $< $@ $(obj)/generated-ust.c-timestamp: $(BUILD_DIR)/trace-events-all $(tracetoo= l-y) $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dust-events-c \ --backends=3D$(TRACE_BACKENDS) \ $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") @@ -48,6 +50,7 @@ $(obj)/generated-tracers.h: $(obj)/generated-tracers.h-ti= mestamp @cmp -s $< $@ || cp $< $@ $(obj)/generated-tracers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUIL= D_DIR)/config-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dh \ --backends=3D$(TRACE_BACKENDS) \ $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") @@ -59,6 +62,7 @@ $(obj)/generated-tracers.c: $(obj)/generated-tracers.c-ti= mestamp @cmp -s $< $@ || cp $< $@ $(obj)/generated-tracers.c-timestamp: $(BUILD_DIR)/trace-events-all $(BUIL= D_DIR)/config-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dc \ --backends=3D$(TRACE_BACKENDS) \ $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") @@ -77,6 +81,7 @@ $(obj)/generated-tracers-dtrace.dtrace: $(obj)/generated-= tracers-dtrace.dtrace-t @cmp $< $@ >/dev/null 2>&1 || cp $< $@ $(obj)/generated-tracers-dtrace.dtrace-timestamp: $(BUILD_DIR)/trace-event= s-all $(BUILD_DIR)/config-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dd \ --backends=3D$(TRACE_BACKENDS) \ $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") @@ -96,6 +101,7 @@ $(obj)/generated-helpers-wrappers.h: $(obj)/generated-he= lpers-wrappers.h-timesta @cmp $< $@ >/dev/null 2>&1 || cp $< $@ $(obj)/generated-helpers-wrappers.h-timestamp: $(BUILD_DIR)/trace-events-a= ll $(BUILD_DIR)/config-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dtcg-helper-wrapper-h \ --backend=3D$(TRACE_BACKENDS) \ $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") @@ -104,6 +110,7 @@ $(obj)/generated-helpers.h: $(obj)/generated-helpers.h-= timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ $(obj)/generated-helpers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUIL= D_DIR)/config-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dtcg-helper-h \ --backend=3D$(TRACE_BACKENDS) \ $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") @@ -112,6 +119,7 @@ $(obj)/generated-helpers.c: $(obj)/generated-helpers.c-= timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ $(obj)/generated-helpers.c-timestamp: $(BUILD_DIR)/trace-events-all $(BUIL= D_DIR)/config-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dtcg-helper-c \ --backend=3D$(TRACE_BACKENDS) \ $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") @@ -125,6 +133,7 @@ $(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tr= acers.h-timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ $(obj)/generated-tcg-tracers.h-timestamp: $(BUILD_DIR)/trace-events-all $(= BUILD_DIR)/config-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ --format=3Dtcg-h \ --backend=3D$(TRACE_BACKENDS) \ $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") diff --git a/scripts/tracetool.py b/scripts/tracetool.py index c9e4737..0c9d992 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -49,6 +49,7 @@ Options: --binary Full path to QEMU binary. --target-type QEMU emulator target type ('system' or 'user'= ). --target-name QEMU emulator target name. + --group Name of the event group --probe-prefix Prefix for dtrace probe names (default: qemu--).\ """ % { @@ -62,22 +63,12 @@ Options: else: sys.exit(1) =20 -def make_group_name(filename): - dirname =3D os.path.realpath(os.path.dirname(filename)) - basedir =3D os.path.join(os.path.dirname(__file__), os.pardir) - basedir =3D os.path.realpath(os.path.abspath(basedir)) - dirname =3D dirname[len(basedir) + 1:] - - if dirname =3D=3D "": - return "common" - return "_" + re.sub(r"[^A-Za-z0-9]", "_", dirname) - def main(args): global _SCRIPT _SCRIPT =3D args[0] =20 long_opts =3D ["backends=3D", "format=3D", "help", "list-backends", - "check-backends"] + "check-backends", "group=3D"] long_opts +=3D ["binary=3D", "target-type=3D", "target-name=3D", "prob= e-prefix=3D"] =20 try: @@ -88,6 +79,7 @@ def main(args): check_backends =3D False arg_backends =3D [] arg_format =3D "" + arg_group =3D None binary =3D None target_type =3D None target_name =3D None @@ -98,6 +90,8 @@ def main(args): =20 elif opt =3D=3D "--backends": arg_backends =3D arg.split(",") + elif opt =3D=3D "--group": + arg_group =3D arg elif opt =3D=3D "--format": arg_format =3D arg =20 @@ -129,6 +123,9 @@ def main(args): sys.exit(1) sys.exit(0) =20 + if arg_group is None: + error_opt("group name is required") + if arg_format =3D=3D "stap": if binary is None: error_opt("--binary is required for SystemTAP tapset generator= ") @@ -145,10 +142,8 @@ def main(args): with open(args[0], "r") as fh: events =3D tracetool.read_events(fh) =20 - group =3D make_group_name(args[0]) - try: - tracetool.generate(events, group, arg_format, arg_backends, + tracetool.generate(events, arg_group, arg_format, arg_backends, binary=3Dbinary, probe_prefix=3Dprobe_prefix) except tracetool.TracetoolError as e: error_opt(str(e)) --=20 2.9.3 From nobody Sun Feb 8 23:37:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1485957379051222.65309622267262; Wed, 1 Feb 2017 05:56:19 -0800 (PST) Received: from localhost ([::1]:51105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvOS-0007ih-OP for importer@patchew.org; Wed, 01 Feb 2017 08:56:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46480) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvDj-0006VK-Vx for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvDf-0004mf-Mt for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56722) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvDf-0004lH-AU for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:07 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 548D876EE; Wed, 1 Feb 2017 13:45:07 +0000 (UTC) Received: from localhost (ovpn-116-240.ams2.redhat.com [10.36.116.240]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11Dj5mW026199; Wed, 1 Feb 2017 08:45:06 -0500 From: Stefan Hajnoczi To: Date: Wed, 1 Feb 2017 13:44:49 +0000 Message-Id: <20170201134453.11963-7-stefanha@redhat.com> In-Reply-To: <20170201134453.11963-1-stefanha@redhat.com> References: <20170201134453.11963-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 01 Feb 2017 13:45:07 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 06/10] trace: switch to modular code generation for sub-directories X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" Introduce rules in the top level Makefile that are able to generate trace.[ch] files in every subdirectory which has a trace-events file. The top level directory is handled specially, so instead of creating trace.h, it creates trace-root.h. This allows sub-directories to include the top level trace-root.h file, without ambiguity wrt to the trace.g file in the current sub-dir. Reviewed-by: Stefan Hajnoczi Signed-off-by: Daniel P. Berrange Message-id: 20170125161417.31949-7-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- Makefile | 156 ++++++++++++++++++++++++++= ---- Makefile.objs | 102 ++++++++++--------- Makefile.target | 7 +- tests/Makefile.include | 2 +- trace/Makefile.objs | 94 +----------------- include/exec/cpu_ldst_template.h | 2 +- include/exec/cpu_ldst_useronly_template.h | 2 +- include/hw/xen/xen_common.h | 2 +- include/trace.h | 6 -- aio-posix.c | 2 +- balloon.c | 2 +- block.c | 2 +- blockdev-nbd.c | 1 - blockdev.c | 2 +- blockjob.c | 1 - cpu-exec.c | 2 +- dma-helpers.c | 2 +- exec.c | 2 +- hw/net/fsl_etsec/etsec.c | 1 - ioport.c | 2 +- kvm-all.c | 2 +- memory.c | 2 +- monitor.c | 2 +- qom/cpu.c | 2 +- spice-qemu-char.c | 2 +- thread-pool.c | 2 +- trace/control-target.c | 2 +- trace/control.c | 2 +- trace/ftrace.c | 2 +- trace/simple.c | 1 - translate-all.c | 2 +- vl.c | 2 +- xen-hvm.c | 2 +- xen-mapcache.c | 2 +- .gitignore | 22 +++-- scripts/tracetool.py | 8 +- scripts/tracetool/backend/dtrace.py | 7 +- scripts/tracetool/backend/simple.py | 1 - scripts/tracetool/backend/ust.py | 7 +- scripts/tracetool/format/c.py | 7 +- scripts/tracetool/format/tcg_h.py | 6 +- scripts/tracetool/format/tcg_helper_c.py | 6 +- scripts/tracetool/format/ust_events_c.py | 2 +- scripts/tracetool/format/ust_events_h.py | 7 +- 44 files changed, 283 insertions(+), 209 deletions(-) delete mode 100644 include/trace.h diff --git a/Makefile b/Makefile index 1e5cb19..3ad4bc2 100644 --- a/Makefile +++ b/Makefile @@ -56,25 +56,136 @@ GENERATED_SOURCES +=3D qmp-marshal.c qapi-types.c qapi= -visit.c qapi-event.c GENERATED_HEADERS +=3D qmp-introspect.h GENERATED_SOURCES +=3D qmp-introspect.c =20 -GENERATED_HEADERS +=3D trace/generated-tracers.h -ifeq ($(findstring dtrace,$(TRACE_BACKENDS)),dtrace) -GENERATED_HEADERS +=3D trace/generated-tracers-dtrace.h -endif -GENERATED_SOURCES +=3D trace/generated-tracers.c - GENERATED_HEADERS +=3D trace/generated-tcg-tracers.h =20 GENERATED_HEADERS +=3D trace/generated-helpers-wrappers.h GENERATED_HEADERS +=3D trace/generated-helpers.h GENERATED_SOURCES +=3D trace/generated-helpers.c =20 -ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust) -GENERATED_HEADERS +=3D trace/generated-ust-provider.h -GENERATED_SOURCES +=3D trace/generated-ust.c +ifdef CONFIG_TRACE_UST +GENERATED_HEADERS +=3D trace-ust-all.h +GENERATED_SOURCES +=3D trace-ust-all.c endif =20 GENERATED_HEADERS +=3D module_block.h =20 +TRACE_HEADERS =3D trace-root.h $(trace-events-subdirs:%=3D%/trace.h) +TRACE_SOURCES =3D trace-root.c $(trace-events-subdirs:%=3D%/trace.c) +TRACE_DTRACE =3D +ifdef CONFIG_TRACE_DTRACE +TRACE_HEADERS +=3D trace-dtrace-root.h $(trace-events-subdirs:%=3D%/trace-= dtrace.h) +TRACE_DTRACE +=3D trace-dtrace-root.dtrace $(trace-events-subdirs:%=3D%/tr= ace-dtrace.dtrace) +endif +ifdef CONFIG_TRACE_UST +TRACE_HEADERS +=3D trace-ust-root.h $(trace-events-subdirs:%=3D%/trace-ust= .h) +endif + +GENERATED_HEADERS +=3D $(TRACE_HEADERS) +GENERATED_SOURCES +=3D $(TRACE_SOURCES) + +trace-group-name =3D $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g') + +%/trace.h: %/trace.h-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ +%/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=3D$(call trace-group-name,$@) \ + --format=3Dh \ + --backends=3D$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(@:%-timestamp=3D%)") + +%/trace.c: %/trace.c-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ +%/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=3D$(call trace-group-name,$@) \ + --format=3Dc \ + --backends=3D$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(@:%-timestamp=3D%)") + +%/trace-ust.h: %/trace-ust.h-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ +%/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=3D$(call trace-group-name,$@) \ + --format=3Dust-events-h \ + --backends=3D$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(@:%-timestamp=3D%)") + +%/trace-dtrace.dtrace: %/trace-dtrace.dtrace-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ +%/trace-dtrace.dtrace-timestamp: $(SRC_PATH)/%/trace-events $(BUILD_DIR)/c= onfig-host.mak $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=3D$(call trace-group-name,$@) \ + --format=3Dd \ + --backends=3D$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(@:%-timestamp=3D%)") + +%/trace-dtrace.h: %/trace-dtrace.dtrace $(tracetool-y) + $(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@") + +%/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y) + + +trace-root.h: trace-root.h-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ +trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=3Droot \ + --format=3Dh \ + --backends=3D$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(@:%-timestamp=3D%)") + +trace-root.c: trace-root.c-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ +trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=3Droot \ + --format=3Dc \ + --backends=3D$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(@:%-timestamp=3D%)") + +trace-ust-root.h: trace-ust-root.h-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ +trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=3Droot \ + --format=3Dust-events-h \ + --backends=3D$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(@:%-timestamp=3D%)") + +trace-ust-all.h: trace-ust-all.h-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ +trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ + --format=3Dust-events-h \ + --backends=3D$(TRACE_BACKENDS) \ + $(trace-events-files) > $@,"GEN","$(@:%-timestamp=3D%)") + +trace-ust-all.c: trace-ust-all.c-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ +trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=3Dall \ + --format=3Dust-events-c \ + --backends=3D$(TRACE_BACKENDS) \ + $(trace-events-files) > $@,"GEN","$(@:%-timestamp=3D%)") + +trace-dtrace-root.dtrace: trace-dtrace-root.dtrace-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ +trace-dtrace-root.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/= config-host.mak $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=3Droot \ + --format=3Dd \ + --backends=3D$(TRACE_BACKENDS) \ + $< > $@,"GEN","$(@:%-timestamp=3D%)") + +trace-dtrace-root.h: trace-dtrace-root.dtrace + $(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@") + +trace-dtrace-root.o: trace-dtrace-root.dtrace + # Don't try to regenerate Makefile or configure # We don't generate any of them Makefile: ; @@ -160,7 +271,8 @@ dummy :=3D $(call unnest-vars,, \ qom-obj-y \ io-obj-y \ common-obj-y \ - common-obj-m) + common-obj-m \ + trace-obj-y) =20 ifneq ($(wildcard config-host.mak),) include $(SRC_PATH)/tests/Makefile.include @@ -223,7 +335,7 @@ subdir-dtc:dtc/libfdt dtc/tests dtc/%: mkdir -p $@ =20 -$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) $(qom-obj-y) = $(crypto-aes-obj-$(CONFIG_USER_ONLY)) +$(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) $(qom-obj-y) = $(crypto-aes-obj-$(CONFIG_USER_ONLY)) $(trace-obj-y) =20 ROMSUBDIR_RULES=3D$(patsubst %,romsubdir-%, $(ROMS)) # Only keep -O and -g cflags @@ -247,15 +359,17 @@ libqemuutil.a: $(util-obj-y) =20 ###################################################################### =20 +COMMON_LDADDS =3D $(trace-obj-y) libqemuutil.a libqemustub.a + qemu-img.o: qemu-img-cmds.h =20 -qemu-img$(EXESUF): qemu-img.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $= (qom-obj-y) libqemuutil.a libqemustub.a -qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $= (qom-obj-y) libqemuutil.a libqemustub.a -qemu-io$(EXESUF): qemu-io.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(q= om-obj-y) libqemuutil.a libqemustub.a +qemu-img$(EXESUF): qemu-img.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $= (qom-obj-y) $(COMMON_LDADDS) +qemu-nbd$(EXESUF): qemu-nbd.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $= (qom-obj-y) $(COMMON_LDADDS) +qemu-io$(EXESUF): qemu-io.o $(block-obj-y) $(crypto-obj-y) $(io-obj-y) $(q= om-obj-y) $(COMMON_LDADDS) =20 -qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o libqemuutil.a libqemustu= b.a +qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS) =20 -fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-m= arshal.o fsdev/9p-iov-marshal.o libqemuutil.a libqemustub.a +fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-m= arshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS) fsdev/virtfs-proxy-helper$(EXESUF): LIBS +=3D -lcap =20 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool @@ -320,7 +434,7 @@ $(qapi-modules) $(SRC_PATH)/scripts/qapi-introspect.py = $(qapi-py) QGALIB_GEN=3D$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-vi= sit.h qga-qmp-commands.h) $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) =20 -qemu-ga$(EXESUF): $(qga-obj-y) libqemuutil.a libqemustub.a +qemu-ga$(EXESUF): $(qga-obj-y) $(COMMON_LDADDS) $(call LINK, $^) =20 ifdef QEMU_GA_MSI_ENABLED @@ -345,9 +459,9 @@ ifneq ($(EXESUF),) qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI) endif =20 -ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) libqemuutil.a libqemustub= .a +ivshmem-client$(EXESUF): $(ivshmem-client-obj-y) $(COMMON_LDADDS) $(call LINK, $^) -ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) libqemuutil.a libqemustub= .a +ivshmem-server$(EXESUF): $(ivshmem-server-obj-y) $(COMMON_LDADDS) $(call LINK, $^) =20 module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak @@ -664,6 +778,10 @@ ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)= ),$(if $(MAKECMDGOALS),,fa Makefile: $(GENERATED_HEADERS) endif =20 +.SECONDARY: $(TRACE_HEADERS) $(TRACE_HEADERS:%=3D%-timestamp) \ + $(TRACE_SOURCES) $(TRACE_SOURCES:%=3D%-timestamp) \ + $(TRACE_DTRACE) $(TRACE_DTRACE:%=3D%-timestamp) + # Include automatically generated dependency files # Dependencies in Makefile.objs files come from our recursive subdir rules -include $(wildcard *.d tests/*.d) diff --git a/Makefile.objs b/Makefile.objs index 6abe0b9..cf2f387 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -118,50 +118,58 @@ ivshmem-server-obj-y =3D contrib/ivshmem-server/ libvhost-user-obj-y =3D contrib/libvhost-user/ =20 ###################################################################### -trace-events-y =3D trace-events -trace-events-y +=3D util/trace-events -trace-events-y +=3D crypto/trace-events -trace-events-y +=3D io/trace-events -trace-events-y +=3D migration/trace-events -trace-events-y +=3D block/trace-events -trace-events-y +=3D hw/block/trace-events -trace-events-y +=3D hw/block/dataplane/trace-events -trace-events-y +=3D hw/char/trace-events -trace-events-y +=3D hw/intc/trace-events -trace-events-y +=3D hw/net/trace-events -trace-events-y +=3D hw/virtio/trace-events -trace-events-y +=3D hw/audio/trace-events -trace-events-y +=3D hw/misc/trace-events -trace-events-y +=3D hw/usb/trace-events -trace-events-y +=3D hw/scsi/trace-events -trace-events-y +=3D hw/nvram/trace-events -trace-events-y +=3D hw/display/trace-events -trace-events-y +=3D hw/input/trace-events -trace-events-y +=3D hw/timer/trace-events -trace-events-y +=3D hw/dma/trace-events -trace-events-y +=3D hw/sparc/trace-events -trace-events-y +=3D hw/sd/trace-events -trace-events-y +=3D hw/isa/trace-events -trace-events-y +=3D hw/mem/trace-events -trace-events-y +=3D hw/i386/trace-events -trace-events-y +=3D hw/i386/xen/trace-events -trace-events-y +=3D hw/9pfs/trace-events -trace-events-y +=3D hw/ppc/trace-events -trace-events-y +=3D hw/pci/trace-events -trace-events-y +=3D hw/s390x/trace-events -trace-events-y +=3D hw/vfio/trace-events -trace-events-y +=3D hw/acpi/trace-events -trace-events-y +=3D hw/arm/trace-events -trace-events-y +=3D hw/alpha/trace-events -trace-events-y +=3D hw/xen/trace-events -trace-events-y +=3D ui/trace-events -trace-events-y +=3D audio/trace-events -trace-events-y +=3D net/trace-events -trace-events-y +=3D target/arm/trace-events -trace-events-y +=3D target/i386/trace-events -trace-events-y +=3D target/sparc/trace-events -trace-events-y +=3D target/s390x/trace-events -trace-events-y +=3D target/ppc/trace-events -trace-events-y +=3D qom/trace-events -trace-events-y +=3D linux-user/trace-events -trace-events-y +=3D qapi/trace-events +trace-events-subdirs =3D +trace-events-subdirs +=3D util +trace-events-subdirs +=3D crypto +trace-events-subdirs +=3D io +trace-events-subdirs +=3D migration +trace-events-subdirs +=3D block +trace-events-subdirs +=3D hw/block +trace-events-subdirs +=3D hw/block/dataplane +trace-events-subdirs +=3D hw/char +trace-events-subdirs +=3D hw/intc +trace-events-subdirs +=3D hw/net +trace-events-subdirs +=3D hw/virtio +trace-events-subdirs +=3D hw/audio +trace-events-subdirs +=3D hw/misc +trace-events-subdirs +=3D hw/usb +trace-events-subdirs +=3D hw/scsi +trace-events-subdirs +=3D hw/nvram +trace-events-subdirs +=3D hw/display +trace-events-subdirs +=3D hw/input +trace-events-subdirs +=3D hw/timer +trace-events-subdirs +=3D hw/dma +trace-events-subdirs +=3D hw/sparc +trace-events-subdirs +=3D hw/sd +trace-events-subdirs +=3D hw/isa +trace-events-subdirs +=3D hw/mem +trace-events-subdirs +=3D hw/i386 +trace-events-subdirs +=3D hw/i386/xen +trace-events-subdirs +=3D hw/9pfs +trace-events-subdirs +=3D hw/ppc +trace-events-subdirs +=3D hw/pci +trace-events-subdirs +=3D hw/s390x +trace-events-subdirs +=3D hw/vfio +trace-events-subdirs +=3D hw/acpi +trace-events-subdirs +=3D hw/arm +trace-events-subdirs +=3D hw/alpha +trace-events-subdirs +=3D hw/xen +trace-events-subdirs +=3D ui +trace-events-subdirs +=3D audio +trace-events-subdirs +=3D net +trace-events-subdirs +=3D target/arm +trace-events-subdirs +=3D target/i386 +trace-events-subdirs +=3D target/sparc +trace-events-subdirs +=3D target/s390x +trace-events-subdirs +=3D target/ppc +trace-events-subdirs +=3D qom +trace-events-subdirs +=3D linux-user +trace-events-subdirs +=3D qapi + +trace-events-files =3D $(SRC_PATH)/trace-events $(trace-events-subdirs:%= =3D$(SRC_PATH)/%/trace-events) + +trace-obj-y =3D trace-root.o +trace-obj-y +=3D $(trace-events-subdirs:%=3D%/trace.o) +trace-obj-$(CONFIG_TRACE_UST) +=3D trace-ust-all.o +trace-obj-$(CONFIG_TRACE_DTRACE) +=3D trace-dtrace-root.o +trace-obj-$(CONFIG_TRACE_DTRACE) +=3D $(trace-events-subdirs:%=3D%/trace-d= trace.o) diff --git a/Makefile.target b/Makefile.target index fa6ae0c..9f2af5b 100644 --- a/Makefile.target +++ b/Makefile.target @@ -186,7 +186,8 @@ dummy :=3D $(call unnest-vars,.., \ qom-obj-y \ io-obj-y \ common-obj-y \ - common-obj-m) + common-obj-m \ + trace-obj-y) target-obj-y :=3D $(target-obj-y-save) all-obj-y +=3D $(common-obj-y) all-obj-y +=3D $(target-obj-y) @@ -198,8 +199,10 @@ all-obj-$(CONFIG_SOFTMMU) +=3D $(io-obj-y) =20 $(QEMU_PROG_BUILD): config-devices.mak =20 +COMMON_LDADDS =3D $(trace-obj-y) ../libqemuutil.a ../libqemustub.a + # build either PROG or PROGW -$(QEMU_PROG_BUILD): $(all-obj-y) ../libqemuutil.a ../libqemustub.a +$(QEMU_PROG_BUILD): $(all-obj-y) $(COMMON_LDADDS) $(call LINK, $(filter-out %.mak, $^)) ifdef CONFIG_DARWIN $(call quiet-command,Rez -append $(SRC_PATH)/pc-bios/qemu.rsrc -o $@,"REZ= ","$(TARGET_DIR)$@") diff --git a/tests/Makefile.include b/tests/Makefile.include index 33b4f88..4447bf3 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -491,7 +491,7 @@ QEMU_CFLAGS +=3D -I$(SRC_PATH)/tests =20 =20 # Deps that are common to various different sets of tests below -test-util-obj-y =3D libqemuutil.a libqemustub.a +test-util-obj-y =3D $(trace-obj-y) libqemuutil.a libqemustub.a test-qom-obj-y =3D $(qom-obj-y) $(test-util-obj-y) test-qapi-obj-y =3D tests/test-qapi-visit.o tests/test-qapi-types.o \ tests/test-qapi-event.o tests/test-qmp-introspect.o \ diff --git a/trace/Makefile.objs b/trace/Makefile.objs index d3b47da..7de840a 100644 --- a/trace/Makefile.objs +++ b/trace/Makefile.objs @@ -8,98 +8,16 @@ tracetool-y =3D $(SRC_PATH)/scripts/tracetool.py tracetool-y +=3D $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py") =20 -$(BUILD_DIR)/trace-events-all: $(trace-events-y:%=3D$(SRC_PATH)/%) +$(BUILD_DIR)/trace-events-all: $(trace-events-files) $(call quiet-command,cat $^ > $@) =20 -###################################################################### -# Auto-generated event descriptions for LTTng ust code - -ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust) - -$(obj)/generated-ust-provider.h: $(obj)/generated-ust-provider.h-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-ust-provider.h-timestamp: $(BUILD_DIR)/trace-events-all $= (tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=3Dall \ - --format=3Dust-events-h \ - --backends=3D$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -$(obj)/generated-ust.c: $(obj)/generated-ust.c-timestamp $(BUILD_DIR)/conf= ig-host.mak - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-ust.c-timestamp: $(BUILD_DIR)/trace-events-all $(tracetoo= l-y) - $(call quiet-command,$(TRACETOOL) \ - --group=3Dall \ - --format=3Dust-events-c \ - --backends=3D$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -$(obj)/generated-tracers.h: $(obj)/generated-ust-provider.h -$(obj)/generated-tracers.c: $(obj)/generated-ust.c - -endif - - -###################################################################### -# Auto-generated tracing routines - -################################################## -# Execution level - -$(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp - @cmp -s $< $@ || cp $< $@ -$(obj)/generated-tracers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUIL= D_DIR)/config-host.mak $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=3Dall \ - --format=3Dh \ - --backends=3D$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -############################## -# non-DTrace - -$(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp - @cmp -s $< $@ || cp $< $@ -$(obj)/generated-tracers.c-timestamp: $(BUILD_DIR)/trace-events-all $(BUIL= D_DIR)/config-host.mak $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=3Dall \ - --format=3Dc \ - --backends=3D$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -$(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tr= acers.h - -############################## -# DTrace - -# Normal practice is to name DTrace probe file with a '.d' extension -# but that gets picked up by QEMU's Makefile as an external dependency -# rule file. So we use '.dtrace' instead -ifeq ($(findstring dtrace,$(TRACE_BACKENDS)),dtrace) - -$(obj)/generated-tracers-dtrace.dtrace: $(obj)/generated-tracers-dtrace.dt= race-timestamp - @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-tracers-dtrace.dtrace-timestamp: $(BUILD_DIR)/trace-event= s-all $(BUILD_DIR)/config-host.mak $(tracetool-y) - $(call quiet-command,$(TRACETOOL) \ - --group=3Dall \ - --format=3Dd \ - --backends=3D$(TRACE_BACKENDS) \ - $< > $@,"GEN","$(patsubst %-timestamp,%,$@)") - -$(obj)/generated-tracers-dtrace.h: $(obj)/generated-tracers-dtrace.dtrace - $(call quiet-command,dtrace -o $@ -h -s $<,"GEN","$@") - -$(obj)/generated-tracers-dtrace.o: $(obj)/generated-tracers-dtrace.dtrace - -util-obj-y +=3D generated-tracers-dtrace.o -endif =20 ################################################## # Translation level =20 $(obj)/generated-helpers-wrappers.h: $(obj)/generated-helpers-wrappers.h-t= imestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-helpers-wrappers.h-timestamp: $(BUILD_DIR)/trace-events-a= ll $(BUILD_DIR)/config-host.mak $(tracetool-y) +$(obj)/generated-helpers-wrappers.h-timestamp: $(trace-events-files) $(BUI= LD_DIR)/config-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=3Dall \ --format=3Dtcg-helper-wrapper-h \ @@ -108,7 +26,7 @@ $(obj)/generated-helpers-wrappers.h-timestamp: $(BUILD_D= IR)/trace-events-all $(B =20 $(obj)/generated-helpers.h: $(obj)/generated-helpers.h-timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-helpers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUIL= D_DIR)/config-host.mak $(tracetool-y) +$(obj)/generated-helpers.h-timestamp: $(trace-events-files) $(BUILD_DIR)/c= onfig-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=3Dall \ --format=3Dtcg-helper-h \ @@ -117,7 +35,7 @@ $(obj)/generated-helpers.h-timestamp: $(BUILD_DIR)/trace= -events-all $(BUILD_DIR) =20 $(obj)/generated-helpers.c: $(obj)/generated-helpers.c-timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-helpers.c-timestamp: $(BUILD_DIR)/trace-events-all $(BUIL= D_DIR)/config-host.mak $(tracetool-y) +$(obj)/generated-helpers.c-timestamp: $(trace-events-files) $(BUILD_DIR)/c= onfig-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=3Dall \ --format=3Dtcg-helper-c \ @@ -131,7 +49,7 @@ target-obj-y +=3D generated-helpers.o =20 $(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ -$(obj)/generated-tcg-tracers.h-timestamp: $(BUILD_DIR)/trace-events-all $(= BUILD_DIR)/config-host.mak $(tracetool-y) +$(obj)/generated-tcg-tracers.h-timestamp: $(trace-events-files) $(BUILD_DI= R)/config-host.mak $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=3Dall \ --format=3Dtcg-h \ @@ -142,10 +60,8 @@ $(obj)/generated-tcg-tracers.h-timestamp: $(BUILD_DIR)/= trace-events-all $(BUILD_ ###################################################################### # Backend code =20 -util-obj-y +=3D generated-tracers.o util-obj-$(CONFIG_TRACE_SIMPLE) +=3D simple.o util-obj-$(CONFIG_TRACE_FTRACE) +=3D ftrace.o -util-obj-$(CONFIG_TRACE_UST) +=3D generated-ust.o util-obj-y +=3D control.o target-obj-y +=3D control-target.o util-obj-y +=3D qmp.o diff --git a/include/exec/cpu_ldst_template.h b/include/exec/cpu_ldst_templ= ate.h index eaf69a1..4db2302 100644 --- a/include/exec/cpu_ldst_template.h +++ b/include/exec/cpu_ldst_template.h @@ -25,7 +25,7 @@ */ =20 #if !defined(SOFTMMU_CODE_ACCESS) -#include "trace.h" +#include "trace-root.h" #endif =20 #include "trace/mem.h" diff --git a/include/exec/cpu_ldst_useronly_template.h b/include/exec/cpu_l= dst_useronly_template.h index b1378bf..7b8c7c5 100644 --- a/include/exec/cpu_ldst_useronly_template.h +++ b/include/exec/cpu_ldst_useronly_template.h @@ -24,7 +24,7 @@ */ =20 #if !defined(CODE_ACCESS) -#include "trace.h" +#include "trace-root.h" #endif =20 #include "trace/mem.h" diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h index 8e1580d..dce76ee 100644 --- a/include/hw/xen/xen_common.h +++ b/include/hw/xen/xen_common.h @@ -18,7 +18,7 @@ #include "hw/xen/xen.h" #include "hw/pci/pci.h" #include "qemu/queue.h" -#include "trace.h" +#include "hw/xen/trace.h" =20 /* * We don't support Xen prior to 4.2.0. diff --git a/include/trace.h b/include/trace.h deleted file mode 100644 index ac9ff3d..0000000 --- a/include/trace.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef TRACE_H -#define TRACE_H - -#include "trace/generated-tracers.h" - -#endif /* TRACE_H */ diff --git a/aio-posix.c b/aio-posix.c index a8d7090..577527f 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -19,7 +19,7 @@ #include "qemu/rcu_queue.h" #include "qemu/sockets.h" #include "qemu/cutils.h" -#include "trace.h" +#include "trace-root.h" #ifdef CONFIG_EPOLL_CREATE1 #include #endif diff --git a/balloon.c b/balloon.c index f2ef50c..1d720ff 100644 --- a/balloon.c +++ b/balloon.c @@ -29,7 +29,7 @@ #include "exec/cpu-common.h" #include "sysemu/kvm.h" #include "sysemu/balloon.h" -#include "trace.h" +#include "trace-root.h" #include "qmp-commands.h" #include "qapi/qmp/qerror.h" #include "qapi/qmp/qjson.h" diff --git a/block.c b/block.c index a0346c8..1dbc060 100644 --- a/block.c +++ b/block.c @@ -22,7 +22,7 @@ * THE SOFTWARE. */ #include "qemu/osdep.h" -#include "trace.h" +#include "block/trace.h" #include "block/block_int.h" #include "block/blockjob.h" #include "block/nbd.h" diff --git a/blockdev-nbd.c b/blockdev-nbd.c index 81bca17..7ea836b 100644 --- a/blockdev-nbd.c +++ b/blockdev-nbd.c @@ -16,7 +16,6 @@ #include "qapi/qmp/qerror.h" #include "sysemu/sysemu.h" #include "qmp-commands.h" -#include "trace.h" #include "block/nbd.h" #include "io/channel-socket.h" =20 diff --git a/blockdev.c b/blockdev.c index 245e1e1..db82ac9 100644 --- a/blockdev.c +++ b/blockdev.c @@ -48,7 +48,7 @@ #include "sysemu/sysemu.h" #include "block/block_int.h" #include "qmp-commands.h" -#include "trace.h" +#include "block/trace.h" #include "sysemu/arch_init.h" #include "qemu/cutils.h" #include "qemu/help_option.h" diff --git a/blockjob.c b/blockjob.c index 513620c..abee11b 100644 --- a/blockjob.c +++ b/blockjob.c @@ -25,7 +25,6 @@ =20 #include "qemu/osdep.h" #include "qemu-common.h" -#include "trace.h" #include "block/block.h" #include "block/blockjob_int.h" #include "block/block_int.h" diff --git a/cpu-exec.c b/cpu-exec.c index fa08c73..57583f1 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -18,7 +18,7 @@ */ #include "qemu/osdep.h" #include "cpu.h" -#include "trace.h" +#include "trace-root.h" #include "disas/disas.h" #include "exec/exec-all.h" #include "tcg.h" diff --git a/dma-helpers.c b/dma-helpers.c index 6f9d47c..97157cc 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "sysemu/block-backend.h" #include "sysemu/dma.h" -#include "trace.h" +#include "trace-root.h" #include "qemu/thread.h" #include "qemu/main-loop.h" =20 diff --git a/exec.c b/exec.c index b05c5d2..8b9ed73 100644 --- a/exec.c +++ b/exec.c @@ -44,7 +44,7 @@ #include "sysemu/dma.h" #include "exec/address-spaces.h" #include "sysemu/xen-mapcache.h" -#include "trace.h" +#include "trace-root.h" #endif #include "exec/cpu-all.h" #include "qemu/rcu_queue.h" diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c index fadf9c8..aa2b0d5 100644 --- a/hw/net/fsl_etsec/etsec.c +++ b/hw/net/fsl_etsec/etsec.c @@ -29,7 +29,6 @@ #include "qemu/osdep.h" #include "sysemu/sysemu.h" #include "hw/sysbus.h" -#include "trace.h" #include "hw/ptimer.h" #include "etsec.h" #include "registers.h" diff --git a/ioport.c b/ioport.c index 94e08ab..1a65add 100644 --- a/ioport.c +++ b/ioport.c @@ -29,7 +29,7 @@ #include "qemu-common.h" #include "cpu.h" #include "exec/ioport.h" -#include "trace.h" +#include "trace-root.h" #include "exec/memory.h" #include "exec/address-spaces.h" =20 diff --git a/kvm-all.c b/kvm-all.c index 330219e..a27c880 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -34,7 +34,7 @@ #include "exec/ram_addr.h" #include "exec/address-spaces.h" #include "qemu/event_notifier.h" -#include "trace.h" +#include "trace-root.h" #include "hw/irq.h" =20 #include "hw/boards.h" diff --git a/memory.c b/memory.c index 6498727..6c58373 100644 --- a/memory.c +++ b/memory.c @@ -24,7 +24,7 @@ #include "qemu/bitops.h" #include "qemu/error-report.h" #include "qom/object.h" -#include "trace.h" +#include "trace-root.h" =20 #include "exec/memory-internal.h" #include "exec/ram_addr.h" diff --git a/monitor.c b/monitor.c index 25a480a..23c24c9 100644 --- a/monitor.c +++ b/monitor.c @@ -59,7 +59,7 @@ #include "qapi/qmp/json-streamer.h" #include "qapi/qmp/json-parser.h" #include "qom/object_interfaces.h" -#include "trace.h" +#include "trace-root.h" #include "trace/control.h" #include "monitor/hmp-target.h" #ifdef CONFIG_TRACE_SIMPLE diff --git a/qom/cpu.c b/qom/cpu.c index e815db7..d57faf3 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -29,7 +29,7 @@ #include "qemu/error-report.h" #include "sysemu/sysemu.h" #include "hw/qdev-properties.h" -#include "trace.h" +#include "trace-root.h" =20 bool cpu_exists(int64_t id) { diff --git a/spice-qemu-char.c b/spice-qemu-char.c index dd97c17..3bdadfc 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "trace.h" +#include "trace-root.h" #include "ui/qemu-spice.h" #include "sysemu/char.h" #include "qemu/error-report.h" diff --git a/thread-pool.c b/thread-pool.c index 6fba913..3847969 100644 --- a/thread-pool.c +++ b/thread-pool.c @@ -19,7 +19,7 @@ #include "qemu/queue.h" #include "qemu/thread.h" #include "qemu/coroutine.h" -#include "trace.h" +#include "trace-root.h" #include "block/thread-pool.h" #include "qemu/main-loop.h" =20 diff --git a/trace/control-target.c b/trace/control-target.c index e2e138a..6266e63 100644 --- a/trace/control-target.c +++ b/trace/control-target.c @@ -9,7 +9,7 @@ =20 #include "qemu/osdep.h" #include "cpu.h" -#include "trace.h" +#include "trace-root.h" #include "trace/control.h" #include "translate-all.h" =20 diff --git a/trace/control.c b/trace/control.c index 56a2632..9b157b0 100644 --- a/trace/control.c +++ b/trace/control.c @@ -26,7 +26,7 @@ #include "qemu/error-report.h" #include "qemu/config-file.h" #include "monitor/monitor.h" -#include "trace.h" +#include "trace-root.h" =20 int trace_events_enabled_count; =20 diff --git a/trace/ftrace.c b/trace/ftrace.c index 3588bb0..7de104d 100644 --- a/trace/ftrace.c +++ b/trace/ftrace.c @@ -10,8 +10,8 @@ */ =20 #include "qemu/osdep.h" -#include "trace.h" #include "trace/control.h" +#include "trace/ftrace.h" =20 int trace_marker_fd; =20 diff --git a/trace/simple.c b/trace/simple.c index b263622..a221a3f 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -13,7 +13,6 @@ #include #endif #include "qemu/timer.h" -#include "trace.h" #include "trace/control.h" #include "trace/simple.h" =20 diff --git a/translate-all.c b/translate-all.c index 6d2fcab..5f44ec8 100644 --- a/translate-all.c +++ b/translate-all.c @@ -25,7 +25,7 @@ #include "qemu-common.h" #define NO_CPU_IO_DEFS #include "cpu.h" -#include "trace.h" +#include "trace-root.h" #include "disas/disas.h" #include "exec/exec-all.h" #include "tcg.h" diff --git a/vl.c b/vl.c index 0b72b12..b4eaf03 100644 --- a/vl.c +++ b/vl.c @@ -110,7 +110,7 @@ int main(int argc, char **argv) =20 #include "slirp/libslirp.h" =20 -#include "trace.h" +#include "trace-root.h" #include "trace/control.h" #include "qemu/queue.h" #include "sysemu/arch_init.h" diff --git a/xen-hvm.c b/xen-hvm.c index 0892361..5043beb 100644 --- a/xen-hvm.c +++ b/xen-hvm.c @@ -22,7 +22,7 @@ #include "qemu/error-report.h" #include "qemu/range.h" #include "sysemu/xen-mapcache.h" -#include "trace.h" +#include "trace-root.h" #include "exec/address-spaces.h" =20 #include diff --git a/xen-mapcache.c b/xen-mapcache.c index 31debdf..1a96d2e 100644 --- a/xen-mapcache.c +++ b/xen-mapcache.c @@ -19,7 +19,7 @@ #include =20 #include "sysemu/xen-mapcache.h" -#include "trace.h" +#include "trace-root.h" =20 =20 //#define MAPCACHE_DEBUG diff --git a/.gitignore b/.gitignore index 78f180a..c563dc1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,18 +6,12 @@ /config.status /config-temp /trace-events-all -/trace/generated-tracers.h -/trace/generated-tracers.c -/trace/generated-tracers-dtrace.h -/trace/generated-tracers.dtrace /trace/generated-events.h /trace/generated-events.c /trace/generated-helpers-wrappers.h /trace/generated-helpers.h /trace/generated-helpers.c /trace/generated-tcg-tracers.h -/trace/generated-ust-provider.h -/trace/generated-ust.c /ui/shader/texture-blit-frag.h /ui/shader/texture-blit-vert.h *-timestamp @@ -120,3 +114,19 @@ tags TAGS docker-src.* *~ +trace.h +trace.c +trace-ust.h +trace-ust.h +trace-dtrace.h +trace-dtrace.dtrace +trace-root.h +trace-root.c +trace-ust-root.h +trace-ust-root.h +trace-ust-all.h +trace-ust-all.c +trace-dtrace-root.h +trace-dtrace-root.dtrace +trace-ust-all.h +trace-ust-all.c diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 0c9d992..c55a215 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -137,10 +137,12 @@ def main(args): if probe_prefix is None: probe_prefix =3D ".".join(["qemu", target_type, target_name]) =20 - if len(args) !=3D 1: + if len(args) < 1: error_opt("missing trace-events filepath") - with open(args[0], "r") as fh: - events =3D tracetool.read_events(fh) + events =3D [] + for arg in args: + with open(arg, "r") as fh: + events.extend(tracetool.read_events(fh)) =20 try: tracetool.generate(events, arg_group, arg_format, arg_backends, diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backen= d/dtrace.py index 79505c6..c469cbd 100644 --- a/scripts/tracetool/backend/dtrace.py +++ b/scripts/tracetool/backend/dtrace.py @@ -36,7 +36,12 @@ def binary(): =20 =20 def generate_h_begin(events, group): - out('#include "trace/generated-tracers-dtrace.h"', + if group =3D=3D "root": + header =3D "trace-dtrace-root.h" + else: + header =3D "trace-dtrace.h" + + out('#include "%s"' % header, '') =20 =20 diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backen= d/simple.py index 85f6102..4acc06e 100644 --- a/scripts/tracetool/backend/simple.py +++ b/scripts/tracetool/backend/simple.py @@ -44,7 +44,6 @@ def generate_h(event, group): =20 def generate_c_begin(events, group): out('#include "qemu/osdep.h"', - '#include "trace.h"', '#include "trace/control.h"', '#include "trace/simple.h"', '') diff --git a/scripts/tracetool/backend/ust.py b/scripts/tracetool/backend/u= st.py index 4594db6..52ce892 100644 --- a/scripts/tracetool/backend/ust.py +++ b/scripts/tracetool/backend/ust.py @@ -20,8 +20,13 @@ PUBLIC =3D True =20 =20 def generate_h_begin(events, group): + if group =3D=3D "root": + header =3D "trace-ust-root.h" + else: + header =3D "trace-ust.h" + out('#include ', - '#include "trace/generated-ust-provider.h"', + '#include "%s"' % header, '') =20 =20 diff --git a/scripts/tracetool/format/c.py b/scripts/tracetool/format/c.py index 47115ed..833c05a 100644 --- a/scripts/tracetool/format/c.py +++ b/scripts/tracetool/format/c.py @@ -20,10 +20,15 @@ def generate(events, backend, group): active_events =3D [e for e in events if "disable" not in e.properties] =20 + if group =3D=3D "root": + header =3D "trace-root.h" + else: + header =3D "trace.h" + out('/* This file is autogenerated by tracetool, do not edit. */', '', '#include "qemu/osdep.h"', - '#include "trace.h"', + '#include "%s"' % header, '') =20 for e in events: diff --git a/scripts/tracetool/format/tcg_h.py b/scripts/tracetool/format/t= cg_h.py index 5f213f6..7ddc4a5 100644 --- a/scripts/tracetool/format/tcg_h.py +++ b/scripts/tracetool/format/tcg_h.py @@ -28,13 +28,17 @@ def vcpu_transform_args(args): =20 =20 def generate(events, backend, group): + if group =3D=3D "root": + header =3D "trace-root.h" + else: + header =3D "trace.h" + out('/* This file is autogenerated by tracetool, do not edit. */', '/* You must include this file after the inclusion of helper.h */', '', '#ifndef TRACE_%s_GENERATED_TCG_TRACERS_H' % group.upper(), '#define TRACE_%s_GENERATED_TCG_TRACERS_H' % group.upper(), '', - '#include "trace.h"', '#include "exec/helper-proto.h"', '', ) diff --git a/scripts/tracetool/format/tcg_helper_c.py b/scripts/tracetool/f= ormat/tcg_helper_c.py index cc26e03..7dccd8c 100644 --- a/scripts/tracetool/format/tcg_helper_c.py +++ b/scripts/tracetool/format/tcg_helper_c.py @@ -41,6 +41,11 @@ def vcpu_transform_args(args, mode): =20 =20 def generate(events, backend, group): + if group =3D=3D "root": + header =3D "trace-root.h" + else: + header =3D "trace.h" + events =3D [e for e in events if "disable" not in e.properties] =20 @@ -49,7 +54,6 @@ def generate(events, backend, group): '#include "qemu/osdep.h"', '#include "qemu-common.h"', '#include "cpu.h"', - '#include "trace.h"', '#include "exec/helper-proto.h"', '', ) diff --git a/scripts/tracetool/format/ust_events_c.py b/scripts/tracetool/f= ormat/ust_events_c.py index cd87d8a..264784c 100644 --- a/scripts/tracetool/format/ust_events_c.py +++ b/scripts/tracetool/format/ust_events_c.py @@ -32,4 +32,4 @@ def generate(events, backend, group): ' */', '#pragma GCC diagnostic ignored "-Wredundant-decls"', '', - '#include "generated-ust-provider.h"') + '#include "trace-ust-all.h"') diff --git a/scripts/tracetool/format/ust_events_h.py b/scripts/tracetool/f= ormat/ust_events_h.py index d853155..514294c 100644 --- a/scripts/tracetool/format/ust_events_h.py +++ b/scripts/tracetool/format/ust_events_h.py @@ -20,13 +20,18 @@ def generate(events, backend, group): events =3D [e for e in events if "disabled" not in e.properties] =20 + if group =3D=3D "all": + include =3D "trace-ust-all.h" + else: + include =3D "trace-ust.h" + out('/* This file is autogenerated by tracetool, do not edit. */', '', '#undef TRACEPOINT_PROVIDER', '#define TRACEPOINT_PROVIDER qemu', '', '#undef TRACEPOINT_INCLUDE_FILE', - '#define TRACEPOINT_INCLUDE_FILE ./generated-ust-provider.h', + '#define TRACEPOINT_INCLUDE_FILE ./%s' % include, '', '#if !defined (TRACE_%s_GENERATED_UST_H) || \\' % group.upper(), ' defined(TRACEPOINT_HEADER_MULTI_READ)', --=20 2.9.3 From nobody Sun Feb 8 23:37:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1485957079282321.30370702310586; Wed, 1 Feb 2017 05:51:19 -0800 (PST) Received: from localhost ([::1]:51081 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvJd-0003M3-H9 for importer@patchew.org; Wed, 01 Feb 2017 08:51:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvDi-0006SR-36 for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvDh-0004oS-5T for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47902) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvDg-0004nE-Ty for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:09 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1502880F6D; Wed, 1 Feb 2017 13:45:09 +0000 (UTC) Received: from localhost (ovpn-116-240.ams2.redhat.com [10.36.116.240]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11Dj7Yu026238; Wed, 1 Feb 2017 08:45:08 -0500 From: Stefan Hajnoczi To: Date: Wed, 1 Feb 2017 13:44:50 +0000 Message-Id: <20170201134453.11963-8-stefanha@redhat.com> In-Reply-To: <20170201134453.11963-1-stefanha@redhat.com> References: <20170201134453.11963-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 01 Feb 2017 13:45:09 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 07/10] trace: update docs to reflect new code generation approach X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" Describe use of per-subdir trace events files and how it impacts code generation. Reviewed-by: Stefan Hajnoczi Signed-off-by: Daniel P. Berrange Message-id: 20170125161417.31949-8-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- docs/tracing.txt | 51 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/docs/tracing.txt b/docs/tracing.txt index f351998a..e14bb6d 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -27,18 +27,44 @@ for debugging, profiling, and observing execution. =20 =3D=3D Trace events =3D=3D =20 +=3D=3D=3D Sub-directory setup =3D=3D=3D + Each directory in the source tree can declare a set of static trace events -in a "trace-events" file. Each trace event declaration names the event, its -arguments, and the format string which can be used for pretty-printing: +in a local "trace-events" file. All directories which contain "trace-event= s" +files must be listed in the "trace-events-subdirs" make variable in the top +level Makefile.objs. During build, the "trace-events" file in each listed +subdirectory will be processed by the "tracetool" script to generate code = for +the trace events. =20 - qemu_vmalloc(size_t size, void *ptr) "size %zu ptr %p" - qemu_vfree(void *ptr) "ptr %p" +The individual "trace-events" files are merged into a "trace-events-all" f= ile, +which is also installed into "/usr/share/qemu" with the name "trace-events= ". +This merged file is to be used by the "simpletrace.py" script to later ana= lyse +traces in the simpletrace data format. =20 -All "trace-events" files must be listed in the "trace-event-y" make variab= le -in the top level Makefile.objs. During build the individual files are comb= ined -to create a "trace-events-all" file, which is processed by the "tracetool" -script during build to generate code for the trace events. The -"trace-events-all" file is also installed into "/usr/share/qemu". +In the sub-directory the following files will be automatically generated + + - trace.c - the trace event state declarations + - trace.h - the trace event enums and probe functions + - trace-dtrace.h - DTrace event probe specification + - trace-dtrace.dtrace - DTrace event probe helper declaration + - trace-dtrace.o - binary DTrace provider (generated by dtrace) + - trace-ust.h - UST event probe helper declarations + +Source files in the sub-directory should #include the local 'trace.h' file, +without any sub-directory path prefix. eg io/channel-buffer.c would do + + #include "trace.h" + +To access the 'io/trace.h' file. While it is possible to include a trace.h +file from outside a source files' own sub-directory, this is discouraged in +general. It is strongly preferred that all events be declared directly in +the sub-directory that uses them. The only exception is where there are so= me +shared trace events defined in the top level directory trace-events file. +The top level directory generates trace files with a filename prefix of +"trace-root" instead of just "trace". This is to avoid ambiguity between +a trace.h in the current directory, vs the top level directory. + +=3D=3D=3D Using trace events =3D=3D=3D =20 Trace events are invoked directly from source code like this: =20 @@ -83,6 +109,13 @@ Format strings should reflect the types defined in the = trace event. Take special care to use PRId64 and PRIu64 for int64_t and uint64_t types, respectively. This ensures portability between 32- and 64-bit platforms. =20 +Each event declaration will start with the event name, then its arguments, +finally a format string for pretty-printing. For example: + + qemu_vmalloc(size_t size, void *ptr) "size %zu ptr %p" + qemu_vfree(void *ptr) "ptr %p" + + =3D=3D=3D Hints for adding new trace events =3D=3D=3D =20 1. Trace state changes in the code. Interesting points in the code usually --=20 2.9.3 From nobody Sun Feb 8 23:37:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1485957080627718.3598868709515; Wed, 1 Feb 2017 05:51:20 -0800 (PST) Received: from localhost ([::1]:51082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvJe-0003Mm-Sf for importer@patchew.org; Wed, 01 Feb 2017 08:51:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvDj-0006Uh-L0 for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvDi-0004pR-QL for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38144) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvDi-0004p9-Ku for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:10 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C9EC4624BA; Wed, 1 Feb 2017 13:45:10 +0000 (UTC) Received: from localhost (ovpn-116-240.ams2.redhat.com [10.36.116.240]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11Dj9i2024929; Wed, 1 Feb 2017 08:45:10 -0500 From: Stefan Hajnoczi To: Date: Wed, 1 Feb 2017 13:44:51 +0000 Message-Id: <20170201134453.11963-9-stefanha@redhat.com> In-Reply-To: <20170201134453.11963-1-stefanha@redhat.com> References: <20170201134453.11963-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 01 Feb 2017 13:45:10 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 08/10] trace: improve error reporting when parsing simpletrace header X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" When loading a simpletrace binary file we just report "Not a valid trace file!" which is not very helpful. Report exactly which field we found to be invalid. Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange Message-id: 20170125161417.31949-9-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- scripts/simpletrace.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py index 4ca903d..4c99004 100755 --- a/scripts/simpletrace.py +++ b/scripts/simpletrace.py @@ -73,10 +73,14 @@ def read_record(edict, idtoname, fobj): def read_trace_header(fobj): """Read and verify trace file header""" header =3D read_header(fobj, log_header_fmt) - if header is None or \ - header[0] !=3D header_event_id or \ - header[1] !=3D header_magic: + if header is None: raise ValueError('Not a valid trace file!') + if header[0] !=3D header_event_id: + raise ValueError('Not a valid trace file, header id %d !=3D %d' % + (header[0], header_event_id)) + if header[1] !=3D header_magic: + raise ValueError('Not a valid trace file, header magic %d !=3D %d'= % + (header[1], header_magic)) =20 log_version =3D header[2] if log_version not in [0, 2, 3, 4]: --=20 2.9.3 From nobody Sun Feb 8 23:37:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1485957513598833.9125685888578; Wed, 1 Feb 2017 05:58:33 -0800 (PST) Received: from localhost ([::1]:51112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvQc-0000oq-2m for importer@patchew.org; Wed, 01 Feb 2017 08:58:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvDn-0006aq-Vf for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvDm-0004ql-A7 for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33080) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvDm-0004qS-2g for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:14 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 04DA33A7685; Wed, 1 Feb 2017 13:45:14 +0000 (UTC) Received: from localhost (ovpn-116-240.ams2.redhat.com [10.36.116.240]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11DjBck004069; Wed, 1 Feb 2017 08:45:12 -0500 From: Stefan Hajnoczi To: Date: Wed, 1 Feb 2017 13:44:52 +0000 Message-Id: <20170201134453.11963-10-stefanha@redhat.com> In-Reply-To: <20170201134453.11963-1-stefanha@redhat.com> References: <20170201134453.11963-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 01 Feb 2017 13:45:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 09/10] qapi: add missing trace_visit_type_enum() call X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" A trace event exists for enums but it's never called. This patch fixes this oversight so that enums are traced just like the other QAPI types. Suggested-by: Daniel P. Berrange Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Message-id: 20170126171613.1399-2-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi --- qapi/qapi-visit-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index 63bd97b..e6e93f0 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi/qapi-visit-core.c @@ -374,6 +374,7 @@ void visit_type_enum(Visitor *v, const char *name, int = *obj, const char *const strings[], Error **errp) { assert(obj && strings); + trace_visit_type_enum(v, name, obj); switch (v->type) { case VISITOR_INPUT: input_type_enum(v, name, obj, strings, errp); --=20 2.9.3 From nobody Sun Feb 8 23:37:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1485957677689376.8688519215319; Wed, 1 Feb 2017 06:01:17 -0800 (PST) Received: from localhost ([::1]:51144 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvTH-0003Gz-3r for importer@patchew.org; Wed, 01 Feb 2017 09:01:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYvDr-0006eA-FB for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYvDo-0004rV-Nw for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38184) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cYvDo-0004qz-Dj for qemu-devel@nongnu.org; Wed, 01 Feb 2017 08:45:16 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1B26561BA0; Wed, 1 Feb 2017 13:45:16 +0000 (UTC) Received: from localhost (ovpn-116-240.ams2.redhat.com [10.36.116.240]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v11DjEXv029288; Wed, 1 Feb 2017 08:45:15 -0500 From: Stefan Hajnoczi To: Date: Wed, 1 Feb 2017 13:44:53 +0000 Message-Id: <20170201134453.11963-11-stefanha@redhat.com> In-Reply-To: <20170201134453.11963-1-stefanha@redhat.com> References: <20170201134453.11963-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 01 Feb 2017 13:45:16 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 10/10] trace: clean up trace-events files X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" There are a number of unused trace events that scripts/cleanup-trace-events.pl finds. The "hw/vfio/pci-quirks.c" filename was typoed and "qapi/qapi-visit-core.c" was missing the qapi/ directory prefix. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Message-id: 20170126171613.1399-3-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi --- block/trace-events | 2 -- hw/block/dataplane/trace-events | 1 - hw/display/trace-events | 1 - hw/i386/trace-events | 1 - hw/input/trace-events | 2 -- hw/intc/trace-events | 1 - hw/net/trace-events | 8 -------- hw/usb/trace-events | 1 - hw/vfio/trace-events | 2 +- migration/trace-events | 3 --- qapi/trace-events | 2 +- trace-events | 1 - 12 files changed, 2 insertions(+), 23 deletions(-) diff --git a/block/trace-events b/block/trace-events index 671a6a8..0bc5c0a 100644 --- a/block/trace-events +++ b/block/trace-events @@ -35,8 +35,6 @@ mirror_one_iteration(void *s, int64_t sector_num, int nb_= sectors) "s %p sector_n mirror_iteration_done(void *s, int64_t sector_num, int nb_sectors, int ret= ) "s %p sector_num %"PRId64" nb_sectors %d ret %d" mirror_yield(void *s, int64_t cnt, int buf_free_count, int in_flight) "s %= p dirty count %"PRId64" free buffers %d in_flight %d" mirror_yield_in_flight(void *s, int64_t sector_num, int in_flight) "s %p s= ector_num %"PRId64" in_flight %d" -mirror_yield_buf_busy(void *s, int nb_chunks, int in_flight) "s %p request= ed chunks %d in_flight %d" -mirror_break_buf_busy(void *s, int nb_chunks, int in_flight) "s %p request= ed chunks %d in_flight %d" =20 # block/backup.c backup_do_cow_enter(void *job, int64_t start, int64_t sector_num, int nb_s= ectors) "job %p start %"PRId64" sector_num %"PRId64" nb_sectors %d" diff --git a/hw/block/dataplane/trace-events b/hw/block/dataplane/trace-eve= nts index 13f5dbb..e07673a 100644 --- a/hw/block/dataplane/trace-events +++ b/hw/block/dataplane/trace-events @@ -3,4 +3,3 @@ # hw/block/dataplane/virtio-blk.c virtio_blk_data_plane_start(void *s) "dataplane %p" virtio_blk_data_plane_stop(void *s) "dataplane %p" -virtio_blk_data_plane_process_request(void *s, unsigned int out_num, unsig= ned int in_num, unsigned int head) "dataplane %p out_num %u in_num %u head = %u" diff --git a/hw/display/trace-events b/hw/display/trace-events index 332abab..aadb612 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -34,7 +34,6 @@ vmware_setmode(uint32_t w, uint32_t h, uint32_t bpp) "%dx= %d @ %d bpp" # hw/display/virtio-gpu.c virtio_gpu_features(bool virgl) "virgl %d" virtio_gpu_cmd_get_display_info(void) "" -virtio_gpu_cmd_get_caps(void) "" virtio_gpu_cmd_set_scanout(uint32_t id, uint32_t res, uint32_t w, uint32_t= h, uint32_t x, uint32_t y) "id %d, res 0x%x, w %d, h %d, x %d, y %d" virtio_gpu_cmd_res_create_2d(uint32_t res, uint32_t fmt, uint32_t w, uint3= 2_t h) "res 0x%x, fmt 0x%x, w %d, h %d" virtio_gpu_cmd_res_create_3d(uint32_t res, uint32_t fmt, uint32_t w, uint3= 2_t h, uint32_t d) "res 0x%x, fmt 0x%x, w %d, h %d, d %d" diff --git a/hw/i386/trace-events b/hw/i386/trace-events index a3568ee..1cc4a10 100644 --- a/hw/i386/trace-events +++ b/hw/i386/trace-events @@ -23,7 +23,6 @@ amdvi_devtab_inval(uint8_t bus, uint8_t slot, uint8_t fun= c) "device table entry amdvi_completion_wait(uint64_t addr, uint64_t data) "completion wait reque= sted with store address 0x%"PRIx64" and store data 0x%"PRIx64 amdvi_control_status(uint64_t val) "MMIO_STATUS state 0x%"PRIx64 amdvi_iotlb_reset(void) "IOTLB exceed size limit - reset " -amdvi_completion_wait_exec(uint64_t addr, uint64_t data) "completion wait = requested with store address 0x%"PRIx64" and store data 0x%"PRIx64 amdvi_dte_get_fail(uint64_t addr, uint32_t offset) "error: failed to acces= s Device Entry devtab 0x%"PRIx64" offset 0x%"PRIx32 amdvi_invalid_dte(uint64_t addr) "PTE entry at 0x%"PRIx64" is invalid " amdvi_get_pte_hwerror(uint64_t addr) "hardware error eccessing PTE at addr= 0x%"PRIx64 diff --git a/hw/input/trace-events b/hw/input/trace-events index 8c4003f..f3bfbed 100644 --- a/hw/input/trace-events +++ b/hw/input/trace-events @@ -8,8 +8,6 @@ ps2_reset_keyboard(void *s) "%p" ps2_write_keyboard(void *opaque, int val) "%p val %d" ps2_keyboard_set_translation(void *opaque, int mode) "%p mode %d" ps2_mouse_send_packet(void *s, int dx1, int dy1, int dz1, int b) "%p x %d = y %d z %d bs %#x" -ps2_mouse_event_disabled(void *opaque, int dx, int dy, int dz, int buttons= _state, int mouse_dx, int mouse_dy, int mouse_dz) "%p x %d y %d z %d bs %#x= mx %d my %d mz %d " -ps2_mouse_event(void *opaque, int dx, int dy, int dz, int buttons_state, i= nt mouse_dx, int mouse_dy, int mouse_dz) "%p x %d y %d z %d bs %#x mx %d my= %d mz %d " ps2_mouse_fake_event(void *opaque) "%p" ps2_write_mouse(void *opaque, int val) "%p val %d" ps2_kbd_reset(void *opaque) "%p" diff --git a/hw/intc/trace-events b/hw/intc/trace-events index 92a6171..39a538d 100644 --- a/hw/intc/trace-events +++ b/hw/intc/trace-events @@ -67,7 +67,6 @@ xics_alloc(int irq) "irq %d" xics_alloc_block(int first, int num, bool lsi, int align) "first irq %d, %= d irqs, lsi=3D%d, alignnum %d" xics_ics_free(int src, int irq, int num) "Source#%d, first irq %d, %d irqs" xics_ics_free_warn(int src, int irq) "Source#%d, irq %d is already free" -xics_icp_post_load(uint32_t server_no, uint32_t xirr, uint64_t addr, uint8= _t pend) "server_no %d, xirr %#x, xirr_owner 0x%" PRIx64 ", pending %d" =20 # hw/intc/s390_flic_kvm.c flic_create_device(int err) "flic: create device failed %d" diff --git a/hw/net/trace-events b/hw/net/trace-events index 1a5c909..c714805 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -63,10 +63,6 @@ net_rx_pkt_l4_csum_validate_entry(void) "Starting L4 che= cksum validation" net_rx_pkt_l4_csum_validate_not_xxp(void) "Not a TCP/UDP packet" net_rx_pkt_l4_csum_validate_udp_with_no_checksum(void) "UDP packet without= checksum" net_rx_pkt_l4_csum_validate_ip4_fragment(void) "IP4 fragment" -net_rx_pkt_l4_csum_validate_ip4_udp(void) "IP4/UDP packet" -net_rx_pkt_l4_csum_validate_ip4_tcp(void) "IP4/TCP packet" -net_rx_pkt_l4_csum_validate_ip6_udp(void) "IP6/UDP packet" -net_rx_pkt_l4_csum_validate_ip6_tcp(void) "IP6/TCP packet" net_rx_pkt_l4_csum_validate_csum(bool csum_valid) "Checksum valid: %d" =20 net_rx_pkt_l4_csum_calc_entry(void) "Starting L4 checksum calculation" @@ -117,7 +113,6 @@ e1000e_core_mdic_read(uint8_t page, uint32_t addr, uint= 32_t data) "MDIC READ: PH e1000e_core_mdic_read_unhandled(uint8_t page, uint32_t addr) "MDIC READ: P= HY[%u][%u] UNHANDLED" e1000e_core_mdic_write(uint8_t page, uint32_t addr, uint32_t data) "MDIC W= RITE: PHY[%u][%u] =3D 0x%x" e1000e_core_mdic_write_unhandled(uint8_t page, uint32_t addr) "MDIC WRITE:= PHY[%u][%u] UNHANDLED" -e1000e_core_eeeprom_write(uint16_t bit_in, uint16_t bit_out, uint16_t read= ing) "eeprom bitnum in %d out %d, reading %d" e1000e_core_ctrl_write(uint64_t index, uint32_t val) "Write CTRL register = 0x%"PRIx64", value: 0x%X" e1000e_core_ctrl_sw_reset(void) "Doing SW reset" e1000e_core_ctrl_phy_reset(void) "Doing PHY reset" @@ -159,7 +154,6 @@ e1000e_rx_desc_buff_write(uint8_t idx, uint64_t addr, u= int16_t offset, const voi e1000e_rx_descr(int ridx, uint64_t base, uint8_t len) "Next RX descriptor:= ring #%d, PA: 0x%"PRIx64", length: %u" e1000e_rx_set_rctl(uint32_t rctl) "RCTL =3D 0x%x" e1000e_rx_receive_iov(int iovcnt) "Received vector of %d fragments" -e1000e_rx_packet_size(size_t full, size_t vhdr, size_t data) "Received pac= ket of %zu bytes total, %zu virt header, %zu data" e1000e_rx_flt_dropped(void) "Received packet dropped by RX filter" e1000e_rx_written_to_guest(uint32_t causes) "Received packet written to gu= est (ICR causes %u)" e1000e_rx_not_written_to_guest(uint32_t causes) "Received packet NOT writt= en to guest (ICR causes %u)" @@ -196,14 +190,12 @@ e1000e_rx_metadata_ipv6_filtering_disabled(void) "IPv= 6 RX filtering disabled by =20 e1000e_vlan_vet(uint16_t vet) "Setting VLAN ethernet type 0x%X" =20 -e1000e_irq_set_cause(uint32_t cause) "IRQ cause set 0x%x" e1000e_irq_msi_notify(uint32_t cause) "MSI notify 0x%x" e1000e_irq_throttling_no_pending_interrupts(void) "No pending interrupts t= o notify" e1000e_irq_msi_notify_postponed(void) "Sending MSI postponed by ITR" e1000e_irq_legacy_notify_postponed(void) "Raising legacy IRQ postponed by = ITR" e1000e_irq_throttling_no_pending_vec(int idx) "No pending interrupts for v= ector %d" e1000e_irq_msix_notify_postponed_vec(int idx) "Sending MSI-X postponed by = EITR[%d]" -e1000e_irq_msix_notify(uint32_t cause) "MSI-X notify 0x%x" e1000e_irq_legacy_notify(bool level) "IRQ line state: %d" e1000e_irq_msix_notify_vec(uint32_t vector) "MSI-X notify vector 0x%x" e1000e_irq_postponed_by_xitr(uint32_t reg) "Interrupt postponed by [E]ITR = register 0x%x" diff --git a/hw/usb/trace-events b/hw/usb/trace-events index 2d42fd4..fdd1d29 100644 --- a/hw/usb/trace-events +++ b/hw/usb/trace-events @@ -60,7 +60,6 @@ usb_ohci_mem_read_bad_offset(uint32_t addr) "%x" usb_ohci_mem_write_unaligned(uint32_t addr) "at %x" usb_ohci_mem_write_bad_offset(uint32_t addr) "%x" usb_ohci_process_lists(uint32_t head, uint32_t cur) "head %x, cur %x" -usb_ohci_bus_eof_timer_failed(const char *name) "%s: timer_new_ns failed" usb_ohci_set_frame_interval(const char *name, uint16_t fi_x, uint16_t fi_u= ) "%s: FrameInterval =3D 0x%x (%u)" usb_ohci_hub_power_up(void) "powered up all ports" usb_ohci_hub_power_down(void) "powered down all ports" diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events index ef81609..8de8281 100644 --- a/hw/vfio/trace-events +++ b/hw/vfio/trace-events @@ -46,7 +46,7 @@ vfio_pci_emulated_device_id(const char *name, uint16_t va= l) "%s %04x" vfio_pci_emulated_sub_vendor_id(const char *name, uint16_t val) "%s %04x" vfio_pci_emulated_sub_device_id(const char *name, uint16_t val) "%s %04x" =20 -# hw/vfio/pci-quirks. +# hw/vfio/pci-quirks.c vfio_quirk_rom_blacklisted(const char *name, uint16_t vid, uint16_t did) "= %s %04x:%04x" vfio_quirk_generic_window_address_write(const char *name, const char * reg= ion_name, uint64_t data) "%s %s 0x%"PRIx64 vfio_quirk_generic_window_data_read(const char *name, const char * region_= name, uint64_t data) "%s %s 0x%"PRIx64 diff --git a/migration/trace-events b/migration/trace-events index 48e531d..fa660e3 100644 --- a/migration/trace-events +++ b/migration/trace-events @@ -4,8 +4,6 @@ qemu_loadvm_state_section(unsigned int section_type) "%d" qemu_loadvm_state_section_command(int ret) "%d" qemu_loadvm_state_section_partend(uint32_t section_id) "%u" -qemu_loadvm_state_main(void) "" -qemu_loadvm_state_main_quit_parent(void) "" qemu_loadvm_state_post_main(int ret) "%d" qemu_loadvm_state_section_startfull(uint32_t section_id, const char *idstr= , uint32_t instance_id, uint32_t version_id) "%u(%s) %u %u" qemu_savevm_send_packaged(void) "" @@ -118,7 +116,6 @@ qemu_rdma_accept_incoming_migration_accepted(void) "" qemu_rdma_accept_pin_state(bool pin) "%d" qemu_rdma_accept_pin_verbsc(void *verbs) "Verbs context after listen: %p" qemu_rdma_block_for_wrid_miss(const char *wcompstr, int wcomp, const char = *gcompstr, uint64_t req) "A Wanted wrid %s (%d) but got %s (%" PRIu64 ")" -qemu_rdma_block_for_wrid_miss_b(const char *wcompstr, int wcomp, const cha= r *gcompstr, uint64_t req) "B Wanted wrid %s (%d) but got %s (%" PRIu64 ")" qemu_rdma_cleanup_disconnect(void) "" qemu_rdma_cleanup_waiting_for_disconnect(void) "" qemu_rdma_close(void) "" diff --git a/qapi/trace-events b/qapi/trace-events index 2c5d3bc..9cbb61b 100644 --- a/qapi/trace-events +++ b/qapi/trace-events @@ -1,4 +1,4 @@ -# qapi-visit-core.c +# qapi/qapi-visit-core.c visit_free(void *v) "v=3D%p" visit_complete(void *v, void *opaque) "v=3D%p opaque=3D%p" =20 diff --git a/trace-events b/trace-events index 05ac6ac..756a947 100644 --- a/trace-events +++ b/trace-events @@ -80,7 +80,6 @@ handle_qmp_command(void *mon, const char *cmd_name) "mon = %p cmd_name \"%s\"" monitor_protocol_event_handler(uint32_t event, void *qdict) "event=3D%d da= ta=3D%p" monitor_protocol_event_emit(uint32_t event, void *data) "event=3D%d data= =3D%p" monitor_protocol_event_queue(uint32_t event, void *qdict, uint64_t rate) "= event=3D%d data=3D%p rate=3D%" PRId64 -monitor_protocol_event_throttle(uint32_t event, uint64_t rate) "event=3D%d= rate=3D%" PRId64 =20 # dma-helpers.c dma_blk_io(void *dbs, void *bs, int64_t offset, bool to_dev) "dbs=3D%p bs= =3D%p offset=3D%" PRId64 " to_dev=3D%d" --=20 2.9.3