All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file
@ 2017-01-06 15:54 Daniel P. Berrange
  2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 01/47] trace: introduce some Makefile rules for module code gen Daniel P. Berrange
                   ` (48 more replies)
  0 siblings, 49 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

This is the final part of my trace events refactoring.

Previously we merged code that split trace-events up
into one file per sub-directory. We also merged code
to the code-generator that enables us to generate
and use multiple independant sets of trace events.

This is the final glue that makes use of these two
earlier changes, so that we actually generate a
separate trace.h & trace.c file per sub-directory.

The result is that when adding a new trace event to
a file, only files in that sub-directory get rebuilt.
Theoretically the build is faster too, since each
source file includes a much smaller trace.h that
only contains probes relevant to it. In reality this
speed benefit is probably marginal & lost in the noise.

The first patch introduces the new Makefile rules to
handle modular building.

The next 43 patches convert over each sub-directory.
They are totally boring and repetative. The only
exception is the patch for target/s390x which hit
a bit of makefile pain, explained in its commit msg.

The 45th patch removes the old, now unused, Makefile
rules for non-modular trace building.

The 46th patch documents the new approach

The final patch is just a small tweak to error
reporting, unrelated to the refactoring.

Daniel P. Berrange (47):
  trace: introduce some Makefile rules for module code gen
  trace: switch io/ directory to modular trace.h file
  trace: switch util/ directory to modular trace.h file
  trace: switch crypto/ directory to modular trace.h file
  trace: switch migration/ directory to modular trace.h file
  trace: switch block/ directory to modular trace.h file
  trace: switch hw/block/ directory to modular trace.h file
  trace: switch hw/char/ directory to modular trace.h file
  trace: switch hw/intc/ directory to modular trace.h file
  trace: switch hw/net/ directory to modular trace.h file
  trace: switch hw/virtio/ directory to modular trace.h file
  trace: switch hw/audio/ directory to modular trace.h file
  trace: switch hw/misc/ directory to modular trace.h file
  trace: switch hw/usb/ directory to modular trace.h file
  trace: switch hw/scsi/ directory to modular trace.h file
  trace: switch hw/nvram/ directory to modular trace.h file
  trace: switch hw/display/ directory to modular trace.h file
  trace: switch hw/input/ directory to modular trace.h file
  trace: switch hw/timer/ directory to modular trace.h file
  trace: switch hw/dma/ directory to modular trace.h file
  trace: switch hw/sparc/ directory to modular trace.h file
  trace: switch hw/sd/ directory to modular trace.h file
  trace: switch hw/isa/ directory to modular trace.h file
  trace: switch hw/mem/ directory to modular trace.h file
  trace: switch hw/i386/ directory to modular trace.h file
  trace: switch hw/9pfs/ directory to modular trace.h file
  trace: switch hw/ppc/ directory to modular trace.h file
  trace: switch hw/pci/ directory to modular trace.h file
  trace: switch hw/s390x/ directory to modular trace.h file
  trace: switch hw/vfio/ directory to modular trace.h file
  trace: switch hw/acpi/ directory to modular trace.h file
  trace: switch hw/arm/ directory to modular trace.h file
  trace: switch hw/alpha/ directory to modular trace.h file
  trace: switch ui/ directory to modular trace.h file
  trace: switch audio/ directory to modular trace.h file
  trace: switch net/ directory to modular trace.h file
  trace: switch target/arm/ directory to modular trace.h file
  trace: switch target/i386/ directory to modular trace.h file
  trace: switch target/sparc/ directory to modular trace.h file
  trace: switch target/s390x/ directory to modular trace.h file
  trace: switch target/ppc/ directory to modular trace.h file
  trace: switch qom/ directory to modular trace.h file
  trace: switch linux-user/ directory to modular trace.h file
  trace: switch qapi/ directory to modular trace.h file
  trace: remove the global include/trace.h file
  trace: update docs to reflect new code generation approach
  trace: improve error reporting when parsing simpletrace header

 .gitignore                               |  14 ++--
 Makefile                                 | 117 ++++++++++++++++++++++++++-----
 Makefile.objs                            |  95 +++++++++++++------------
 Makefile.target                          |  30 +++++++-
 audio/Makefile.objs                      |   2 +
 audio/alsaaudio.c                        |   2 +-
 audio/ossaudio.c                         |   2 +-
 block.c                                  |   2 +-
 block/Makefile.objs                      |   2 +
 block/backup.c                           |   2 +-
 block/block-backend.c                    |   2 +-
 block/commit.c                           |   2 +-
 block/dirty-bitmap.c                     |   2 +-
 block/io.c                               |   2 +-
 block/mirror.c                           |   2 +-
 block/nfs.c                              |   2 +-
 block/qcow2-cache.c                      |   2 +-
 block/qcow2-cluster.c                    |   2 +-
 block/qcow2.c                            |   2 +-
 block/qed-l2-cache.c                     |   2 +-
 block/qed-table.c                        |   2 +-
 block/qed.c                              |   2 +-
 block/raw-posix.c                        |   2 +-
 block/raw-win32.c                        |   2 +-
 block/stream.c                           |   2 +-
 blockdev.c                               |   2 +-
 crypto/Makefile.objs                     |   2 +
 crypto/secret.c                          |   2 +-
 crypto/tlscreds.c                        |   2 +-
 crypto/tlscredsanon.c                    |   2 +-
 crypto/tlscredsx509.c                    |   2 +-
 crypto/tlssession.c                      |   2 +-
 docs/tracing.txt                         |  61 +++++++++++++---
 hw/9pfs/9p.c                             |   2 +-
 hw/9pfs/Makefile.objs                    |   2 +
 hw/acpi/Makefile.objs                    |   2 +
 hw/acpi/cpu.c                            |   2 +-
 hw/acpi/memory_hotplug.c                 |   2 +-
 hw/alpha/Makefile.objs                   |   2 +
 hw/alpha/pci.c                           |   2 +-
 hw/arm/Makefile.objs                     |   2 +
 hw/arm/virt-acpi-build.c                 |   2 +-
 hw/audio/Makefile.objs                   |   3 +
 hw/audio/cs4231.c                        |   2 +-
 hw/audio/milkymist-ac97.c                |   2 +-
 hw/block/Makefile.objs                   |   2 +
 hw/block/dataplane/virtio-blk.c          |   2 +-
 hw/block/hd-geometry.c                   |   2 +-
 hw/block/virtio-blk.c                    |   2 +-
 hw/char/Makefile.objs                    |   2 +
 hw/char/escc.c                           |   2 +-
 hw/char/grlib_apbuart.c                  |   2 +-
 hw/char/lm32_juart.c                     |   2 +-
 hw/char/lm32_uart.c                      |   2 +-
 hw/char/milkymist-uart.c                 |   2 +-
 hw/char/virtio-console.c                 |   2 +-
 hw/char/virtio-serial-bus.c              |   2 +-
 hw/display/Makefile.objs                 |   3 +
 hw/display/g364fb.c                      |   2 +-
 hw/display/jazz_led.c                    |   2 +-
 hw/display/milkymist-tmu2.c              |   2 +-
 hw/display/milkymist-vgafb.c             |   2 +-
 hw/display/qxl-render.c                  |   2 +-
 hw/display/qxl.c                         |   2 +-
 hw/display/vga.c                         |   2 +-
 hw/display/virtio-gpu-3d.c               |   2 +-
 hw/display/virtio-gpu.c                  |   2 +-
 hw/display/vmware_vga.c                  |   2 +-
 hw/display/xenfb.c                       |   2 +-
 hw/dma/Makefile.objs                     |   2 +
 hw/dma/i8257.c                           |   2 +-
 hw/dma/rc4030.c                          |   2 +-
 hw/dma/sparc32_dma.c                     |   2 +-
 hw/dma/sun4m_iommu.c                     |   2 +-
 hw/i386/Makefile.objs                    |   2 +
 hw/i386/x86-iommu.c                      |   2 +-
 hw/i386/xen/xen_platform.c               |   1 +
 hw/i386/xen/xen_pvdevice.c               |   1 +
 hw/input/Makefile.objs                   |   3 +
 hw/input/hid.c                           |   2 +-
 hw/input/milkymist-softusb.c             |   2 +-
 hw/input/ps2.c                           |   2 +-
 hw/input/virtio-input.c                  |   2 +-
 hw/intc/Makefile.objs                    |   2 +
 hw/intc/apic.c                           |   2 +-
 hw/intc/apic_common.c                    |   2 +-
 hw/intc/arm_gic.c                        |   2 +-
 hw/intc/arm_gicv3_cpuif.c                |   2 +-
 hw/intc/arm_gicv3_dist.c                 |   2 +-
 hw/intc/arm_gicv3_redist.c               |   2 +-
 hw/intc/aspeed_vic.c                     |   2 +-
 hw/intc/grlib_irqmp.c                    |   2 +-
 hw/intc/lm32_pic.c                       |   2 +-
 hw/intc/s390_flic.c                      |   2 +-
 hw/intc/s390_flic_kvm.c                  |   2 +-
 hw/intc/slavio_intctl.c                  |   2 +-
 hw/intc/xics.c                           |   2 +-
 hw/intc/xics_kvm.c                       |   2 +-
 hw/intc/xics_spapr.c                     |   2 +-
 hw/isa/Makefile.objs                     |   2 +
 hw/isa/pc87312.c                         |   2 +-
 hw/mem/Makefile.objs                     |   3 +
 hw/mem/pc-dimm.c                         |   2 +-
 hw/misc/Makefile.objs                    |   3 +
 hw/misc/aspeed_scu.c                     |   2 +-
 hw/misc/eccmemctl.c                      |   2 +-
 hw/misc/milkymist-hpdmc.c                |   2 +-
 hw/misc/milkymist-pfpu.c                 |   2 +-
 hw/misc/slavio_misc.c                    |   2 +-
 hw/net/Makefile.objs                     |   3 +
 hw/net/e1000e.c                          |   2 +-
 hw/net/e1000e_core.c                     |   2 +-
 hw/net/e1000x_common.c                   |   2 +-
 hw/net/lance.c                           |   2 +-
 hw/net/milkymist-minimac2.c              |   2 +-
 hw/net/mipsnet.c                         |   2 +-
 hw/net/net_rx_pkt.c                      |   2 +-
 hw/net/opencores_eth.c                   |   2 +-
 hw/net/pcnet-pci.c                       |   2 +-
 hw/net/pcnet.c                           |   2 +-
 hw/nvram/Makefile.objs                   |   2 +
 hw/nvram/ds1225y.c                       |   2 +-
 hw/nvram/fw_cfg.c                        |   2 +-
 hw/pci/Makefile.objs                     |   2 +
 hw/pci/pci.c                             |   2 +-
 hw/pci/pci_host.c                        |   2 +-
 hw/ppc/Makefile.objs                     |   3 +
 hw/ppc/ppc.c                             |   2 +-
 hw/ppc/prep.c                            |   2 +-
 hw/ppc/spapr.c                           |   2 +-
 hw/ppc/spapr_hcall.c                     |   2 +-
 hw/ppc/spapr_iommu.c                     |   2 +-
 hw/ppc/spapr_pci.c                       |   2 +-
 hw/ppc/spapr_rtas_ddw.c                  |   2 +-
 hw/s390x/Makefile.objs                   |   3 +
 hw/s390x/css.c                           |   2 +-
 hw/s390x/virtio-ccw.c                    |   2 +-
 hw/scsi/Makefile.objs                    |   3 +
 hw/scsi/esp-pci.c                        |   2 +-
 hw/scsi/esp.c                            |   2 +-
 hw/scsi/megasas.c                        |   2 +-
 hw/scsi/mptconfig.c                      |   2 +-
 hw/scsi/mptendian.c                      |   2 +-
 hw/scsi/mptsas.c                         |   2 +-
 hw/scsi/scsi-bus.c                       |   2 +-
 hw/scsi/vmw_pvscsi.c                     |   2 +-
 hw/sd/Makefile.objs                      |   2 +
 hw/sd/milkymist-memcard.c                |   2 +-
 hw/sparc/Makefile.objs                   |   2 +
 hw/sparc/leon3.c                         |   2 +-
 hw/sparc/sun4m.c                         |   2 +-
 hw/timer/Makefile.objs                   |   2 +
 hw/timer/aspeed_timer.c                  |   2 +-
 hw/timer/grlib_gptimer.c                 |   2 +-
 hw/timer/lm32_timer.c                    |   2 +-
 hw/timer/milkymist-sysctl.c              |   2 +-
 hw/timer/slavio_timer.c                  |   2 +-
 hw/usb/Makefile.objs                     |   3 +
 hw/usb/bus.c                             |   2 +-
 hw/usb/combined-packet.c                 |   2 +-
 hw/usb/core.c                            |   2 +-
 hw/usb/desc.c                            |   2 +-
 hw/usb/dev-hub.c                         |   2 +-
 hw/usb/dev-mtp.c                         |   2 +-
 hw/usb/dev-uas.c                         |   2 +-
 hw/usb/hcd-ehci.c                        |   2 +-
 hw/usb/hcd-ohci.c                        |   2 +-
 hw/usb/hcd-uhci.c                        |   2 +-
 hw/usb/hcd-xhci.c                        |   2 +-
 hw/usb/host-libusb.c                     |   2 +-
 hw/vfio/Makefile.objs                    |   2 +
 hw/vfio/common.c                         |   2 +-
 hw/vfio/pci-quirks.c                     |   2 +-
 hw/vfio/pci.c                            |   2 +-
 hw/vfio/platform.c                       |   2 +-
 hw/vfio/spapr.c                          |   2 +-
 hw/virtio/Makefile.objs                  |   2 +
 hw/virtio/virtio-balloon.c               |   2 +-
 hw/virtio/virtio-rng.c                   |   2 +-
 hw/virtio/virtio.c                       |   2 +-
 include/trace.h                          |   6 --
 io/Makefile.objs                         |   2 +
 io/channel-buffer.c                      |   2 +-
 io/channel-command.c                     |   2 +-
 io/channel-file.c                        |   2 +-
 io/channel-socket.c                      |   2 +-
 io/channel-tls.c                         |   2 +-
 io/channel-websock.c                     |   2 +-
 io/task.c                                |   2 +-
 linux-user/Makefile.objs                 |   2 +
 linux-user/signal.c                      |   2 +-
 migration/Makefile.objs                  |   2 +
 migration/exec.c                         |   2 +-
 migration/fd.c                           |   2 +-
 migration/migration.c                    |   2 +-
 migration/postcopy-ram.c                 |   2 +-
 migration/qemu-file.c                    |   2 +-
 migration/ram.c                          |   2 +-
 migration/rdma.c                         |   2 +-
 migration/savevm.c                       |   2 +-
 migration/socket.c                       |   2 +-
 migration/tls.c                          |   2 +-
 migration/vmstate.c                      |   2 +-
 net/Makefile.objs                        |   2 +
 net/filter-mirror.c                      |   2 +-
 net/vhost-user.c                         |   2 +-
 qapi/Makefile.objs                       |   2 +
 qapi/qapi-visit-core.c                   |   2 +-
 qom/Makefile.objs                        |   2 +
 qom/object.c                             |   2 +-
 qom/trace-events                         |   7 ++
 scripts/simpletrace.py                   |  10 ++-
 scripts/tracetool/backend/dtrace.py      |   2 +-
 scripts/tracetool/backend/ust.py         |   2 +-
 scripts/tracetool/format/ust_events_c.py |   2 +-
 scripts/tracetool/format/ust_events_h.py |   7 +-
 target/arm/Makefile.objs                 |   2 +
 target/arm/helper.c                      |   2 +-
 target/i386/Makefile.objs                |   2 +
 target/i386/kvm.c                        |   2 +-
 target/ppc/Makefile.objs                 |   2 +
 target/ppc/kvm.c                         |   2 +-
 target/s390x/Makefile.objs               |  21 +-----
 target/s390x/cpu.c                       |   2 +-
 target/s390x/ioinst.c                    |   2 +-
 target/s390x/kvm.c                       |   2 +-
 target/s390x/mmu_helper.c                |   2 +-
 target/sparc/Makefile.objs               |   2 +
 target/sparc/int32_helper.c              |   2 +-
 target/sparc/int64_helper.c              |   2 +-
 target/sparc/mmu_helper.c                |   2 +-
 target/sparc/win_helper.c                |   2 +-
 tests/Makefile.include                   |   2 +-
 trace-events                             |   6 --
 trace/Makefile.objs                      |  81 +--------------------
 ui/Makefile.objs                         |   3 +
 ui/console.c                             |   2 +-
 ui/gtk-egl.c                             |   2 +-
 ui/gtk-gl-area.c                         |   2 +-
 ui/gtk.c                                 |   2 +-
 ui/input.c                               |   2 +-
 ui/spice-display.c                       |   2 +-
 ui/vnc.c                                 |   2 +-
 util/Makefile.objs                       |   2 +
 util/buffer.c                            |   2 +-
 util/hbitmap.c                           |   2 +-
 util/oslib-posix.c                       |   2 +-
 util/oslib-win32.c                       |   2 +-
 util/qemu-coroutine-lock.c               |   2 +-
 util/qemu-coroutine.c                    |   2 +-
 250 files changed, 552 insertions(+), 388 deletions(-)
 delete mode 100644 include/trace.h

-- 
2.9.3

^ permalink raw reply	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 01/47] trace: introduce some Makefile rules for module code gen
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
@ 2017-01-06 15:54 ` Daniel P. Berrange
  2017-01-06 17:20   ` Lluís Vilanova
  2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file Daniel P. Berrange
                   ` (47 subsequent siblings)
  48 siblings, 1 reply; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Introduce rules that are able to generate trace.[ch] files
in every subdirectory which has a trace-events file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 .gitignore                               |  6 +++
 Makefile                                 | 65 +++++++++++++++++++++++++++-----
 Makefile.objs                            |  5 +++
 Makefile.target                          |  7 +++-
 scripts/tracetool/backend/dtrace.py      |  7 +++-
 scripts/tracetool/backend/ust.py         |  7 +++-
 scripts/tracetool/format/ust_events_c.py |  2 +-
 scripts/tracetool/format/ust_events_h.py |  7 +++-
 tests/Makefile.include                   |  2 +-
 trace/Makefile.objs                      | 23 ++++++++---
 10 files changed, 109 insertions(+), 22 deletions(-)

diff --git a/.gitignore b/.gitignore
index e43c304..fe6add3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -111,3 +111,9 @@ tags
 TAGS
 docker-src.*
 *~
+trace.h
+trace.c
+trace-events-common
+trace-ust.h
+trace-dtrace.h
+trace-dtrace.dtrace
diff --git a/Makefile b/Makefile
index 214cbad..181802b 100644
--- a/Makefile
+++ b/Makefile
@@ -70,11 +70,53 @@ GENERATED_SOURCES += trace/generated-helpers.c
 
 ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust)
 GENERATED_HEADERS += trace/generated-ust-provider.h
+GENERATED_HEADERS += trace/generated-ust-provider-all.h
 GENERATED_SOURCES += trace/generated-ust.c
 endif
 
 GENERATED_HEADERS += module_block.h
 
+GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace.h)
+GENERATED_SOURCES += $(trace-events-subdirs:%=%/trace.c)
+GENERATED_DTRACE =
+ifdef CONFIG_TRACE_DTRACE
+GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-dtrace.h)
+GENERATED_DTRACE += $(trace-events-subdirs:%=%/trace-dtrace.dtrace)
+endif
+ifdef CONFIG_TRACE_UST
+GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-ust.h)
+endif
+
+%/trace.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=h \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$@")
+
+%/trace.c: $(SRC_PATH)/%/trace-events $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=c \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$@")
+
+%/trace-ust.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=ust-events-h \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$@")
+
+%/trace-dtrace.dtrace: $(SRC_PATH)/%/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=d \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$@")
+
+%/trace-dtrace.h: %/trace-dtrace.dtrace $(tracetool-y)
+	$(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@")
+
+%/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y)
+
+
 # Don't try to regenerate Makefile or configure
 # We don't generate any of them
 Makefile: ;
@@ -157,7 +199,8 @@ dummy := $(call unnest-vars,, \
                 qom-obj-y \
                 io-obj-y \
                 common-obj-y \
-                common-obj-m)
+                common-obj-m \
+                trace-obj-y)
 
 ifneq ($(wildcard config-host.mak),)
 include $(SRC_PATH)/tests/Makefile.include
@@ -244,15 +287,17 @@ libqemuutil.a: $(util-obj-y)
 
 ######################################################################
 
+COMMON_LDADDS = $(trace-obj-y) libqemuutil.a libqemustub.a
+
 qemu-img.o: qemu-img-cmds.h
 
-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) $(qom-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) $(qom-obj-y) $(COMMON_LDADDS)
 
-qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o libqemuutil.a libqemustub.a
+qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o $(COMMON_LDADDS)
 
-fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o libqemuutil.a libqemustub.a
+fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/9p-marshal.o fsdev/9p-iov-marshal.o $(COMMON_LDADDS)
 fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
 
 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
@@ -316,7 +361,7 @@ $(qapi-modules) $(SRC_PATH)/scripts/qapi-introspect.py $(qapi-py)
 QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
 $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
 
-qemu-ga$(EXESUF): $(qga-obj-y) libqemuutil.a libqemustub.a
+qemu-ga$(EXESUF): $(qga-obj-y) $(COMMON_LDADDS)
 	$(call LINK, $^)
 
 ifdef QEMU_GA_MSI_ENABLED
@@ -341,9 +386,9 @@ ifneq ($(EXESUF),)
 qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
 endif
 
-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, $^)
 
 module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
@@ -657,6 +702,8 @@ ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fa
 Makefile: $(GENERATED_HEADERS)
 endif
 
+.SECONDARY: $(GENERATED_HEADERS) $(GENERATED_SOURCES) $(GENERATED_DTRACE)
+
 # 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 51c36a4..fc398d5 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -118,6 +118,7 @@ ivshmem-server-obj-y = contrib/ivshmem-server/
 
 
 ######################################################################
+trace-events-subdirs =
 trace-events-y = trace-events
 trace-events-y += util/trace-events
 trace-events-y += crypto/trace-events
@@ -162,3 +163,7 @@ trace-events-y += target/ppc/trace-events
 trace-events-y += qom/trace-events
 trace-events-y += linux-user/trace-events
 trace-events-y += qapi/trace-events
+
+trace-events-files = $(trace-events-y) $(trace-events-subdirs:%=%/trace-events)
+
+trace-obj-y = $(trace-events-subdirs:%=%/)
diff --git a/Makefile.target b/Makefile.target
index 8ae82cb..b14ab45 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -182,7 +182,8 @@ dummy := $(call unnest-vars,.., \
                qom-obj-y \
                io-obj-y \
                common-obj-y \
-               common-obj-m)
+               common-obj-m \
+               trace-obj-y)
 target-obj-y := $(target-obj-y-save)
 all-obj-y += $(common-obj-y)
 all-obj-y += $(target-obj-y)
@@ -194,8 +195,10 @@ all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y)
 
 $(QEMU_PROG_BUILD): config-devices.mak
 
+COMMON_LDADDS = $(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/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
index 79505c6..1319990 100644
--- a/scripts/tracetool/backend/dtrace.py
+++ b/scripts/tracetool/backend/dtrace.py
@@ -36,7 +36,12 @@ def binary():
 
 
 def generate_h_begin(events, group):
-    out('#include "trace/generated-tracers-dtrace.h"',
+    if group == "common":
+        include = "trace/generated-tracers-dtrace.h"
+    else:
+        include = "trace-dtrace.h"
+
+    out('#include "%s"' % include,
         '')
 
 
diff --git a/scripts/tracetool/backend/ust.py b/scripts/tracetool/backend/ust.py
index 4594db6..599c12e 100644
--- a/scripts/tracetool/backend/ust.py
+++ b/scripts/tracetool/backend/ust.py
@@ -20,8 +20,13 @@ PUBLIC = True
 
 
 def generate_h_begin(events, group):
+    if group == "common":
+        include = "trace/generated-ust-provider.h"
+    else:
+        include = "trace-ust.h"
+
     out('#include <lttng/tracepoint.h>',
-        '#include "trace/generated-ust-provider.h"',
+        '#include "%s"' % include,
         '')
 
 
diff --git a/scripts/tracetool/format/ust_events_c.py b/scripts/tracetool/format/ust_events_c.py
index cd87d8a..8be8116 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 "generated-ust-provider-all.h"')
diff --git a/scripts/tracetool/format/ust_events_h.py b/scripts/tracetool/format/ust_events_h.py
index d853155..6fbdb9f 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 = [e for e in events
               if "disabled" not in e.properties]
 
+    if group == "common":
+        include = "generated-ust-provider.h"
+    else:
+        include = "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)',
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 4841d58..c255e65 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -470,7 +470,7 @@ QEMU_CFLAGS += -I$(SRC_PATH)/tests
 
 
 # Deps that are common to various different sets of tests below
-test-util-obj-y = libqemuutil.a libqemustub.a
+test-util-obj-y = $(trace-obj-y) libqemuutil.a libqemustub.a
 test-qom-obj-y = $(qom-obj-y) $(test-util-obj-y)
 test-qapi-obj-y = 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 1e1ce74..4522914 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -8,9 +8,12 @@
 tracetool-y = $(SRC_PATH)/scripts/tracetool.py
 tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
 
-$(BUILD_DIR)/trace-events-all: $(trace-events-y:%=$(SRC_PATH)/%)
+$(BUILD_DIR)/trace-events-all: $(trace-events-files:%=$(SRC_PATH)/%)
 	$(call quiet-command,cat $^ > $@)
 
+$(BUILD_DIR)/trace-events-common: $(trace-events-y:%=$(SRC_PATH)/%) Makefile.objs
+	$(call quiet-command,cat $(trace-events-y:%=$(SRC_PATH)/%) > $@)
+
 ######################################################################
 # Auto-generated event descriptions for LTTng ust code
 
@@ -18,7 +21,15 @@ 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)
+$(obj)/generated-ust-provider.h-timestamp: $(BUILD_DIR)/trace-events-common $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=ust-events-h \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
+
+$(obj)/generated-ust-provider-all.h: $(obj)/generated-ust-provider-all.h-timestamp
+	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
+$(obj)/generated-ust-provider-all.h-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=ust-events-h \
 		--backends=$(TRACE_BACKENDS) \
@@ -32,7 +43,7 @@ $(obj)/generated-ust.c-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
 		--backends=$(TRACE_BACKENDS) \
 		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
 
-$(obj)/generated-tracers.h: $(obj)/generated-ust-provider.h
+$(obj)/generated-tracers.h: $(obj)/generated-ust-provider.h $(obj)/generated-ust-provider-all.h
 $(obj)/generated-tracers.c: $(obj)/generated-ust.c
 
 endif
@@ -46,7 +57,7 @@ endif
 
 $(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
 	@cmp -s $< $@ || cp $< $@
-$(obj)/generated-tracers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)/config-host.mak $(tracetool-y)
+$(obj)/generated-tracers.h-timestamp: $(BUILD_DIR)/trace-events-common $(BUILD_DIR)/config-host.mak $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=h \
 		--backends=$(TRACE_BACKENDS) \
@@ -57,7 +68,7 @@ $(obj)/generated-tracers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)
 
 $(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
 	@cmp -s $< $@ || cp $< $@
-$(obj)/generated-tracers.c-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)/config-host.mak $(tracetool-y)
+$(obj)/generated-tracers.c-timestamp: $(BUILD_DIR)/trace-events-common $(BUILD_DIR)/config-host.mak $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=c \
 		--backends=$(TRACE_BACKENDS) \
@@ -75,7 +86,7 @@ ifeq ($(findstring dtrace,$(TRACE_BACKENDS)),dtrace)
 
 $(obj)/generated-tracers-dtrace.dtrace: $(obj)/generated-tracers-dtrace.dtrace-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-tracers-dtrace.dtrace-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)/config-host.mak $(tracetool-y)
+$(obj)/generated-tracers-dtrace.dtrace-timestamp: $(BUILD_DIR)/trace-events-common $(BUILD_DIR)/config-host.mak $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=d \
 		--backends=$(TRACE_BACKENDS) \
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
  2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 01/47] trace: introduce some Makefile rules for module code gen Daniel P. Berrange
@ 2017-01-06 15:54 ` Daniel P. Berrange
  2017-01-10 16:37   ` Stefan Hajnoczi
  2017-01-10 16:38   ` Stefan Hajnoczi
  2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 03/47] trace: switch util/ " Daniel P. Berrange
                   ` (46 subsequent siblings)
  48 siblings, 2 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the io/ directory to include the
io/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs        | 2 +-
 io/Makefile.objs     | 2 ++
 io/channel-buffer.c  | 2 +-
 io/channel-command.c | 2 +-
 io/channel-file.c    | 2 +-
 io/channel-socket.c  | 2 +-
 io/channel-tls.c     | 2 +-
 io/channel-websock.c | 2 +-
 io/task.c            | 2 +-
 9 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index fc398d5..c3f1e45 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -122,7 +122,7 @@ trace-events-subdirs =
 trace-events-y = trace-events
 trace-events-y += util/trace-events
 trace-events-y += crypto/trace-events
-trace-events-y += io/trace-events
+trace-events-subdirs += io
 trace-events-y += migration/trace-events
 trace-events-y += block/trace-events
 trace-events-y += hw/block/trace-events
diff --git a/io/Makefile.objs b/io/Makefile.objs
index 9d8337d..94cb74e 100644
--- a/io/Makefile.objs
+++ b/io/Makefile.objs
@@ -8,3 +8,5 @@ io-obj-y += channel-watch.o
 io-obj-y += channel-websock.o
 io-obj-y += channel-util.o
 io-obj-y += task.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/io/channel-buffer.c b/io/channel-buffer.c
index 43d7959..b4e50d6 100644
--- a/io/channel-buffer.c
+++ b/io/channel-buffer.c
@@ -22,7 +22,7 @@
 #include "io/channel-buffer.h"
 #include "io/channel-watch.h"
 #include "qemu/sockets.h"
-#include "trace.h"
+#include "io/trace.h"
 
 QIOChannelBuffer *
 qio_channel_buffer_new(size_t capacity)
diff --git a/io/channel-command.c b/io/channel-command.c
index ad25313..7624653 100644
--- a/io/channel-command.c
+++ b/io/channel-command.c
@@ -23,7 +23,7 @@
 #include "io/channel-watch.h"
 #include "qapi/error.h"
 #include "qemu/sockets.h"
-#include "trace.h"
+#include "io/trace.h"
 
 
 QIOChannelCommand *
diff --git a/io/channel-file.c b/io/channel-file.c
index e1da243..7b064ef 100644
--- a/io/channel-file.c
+++ b/io/channel-file.c
@@ -23,7 +23,7 @@
 #include "io/channel-watch.h"
 #include "qapi/error.h"
 #include "qemu/sockets.h"
-#include "trace.h"
+#include "io/trace.h"
 
 QIOChannelFile *
 qio_channel_file_new_fd(int fd)
diff --git a/io/channel-socket.c b/io/channel-socket.c
index d7e03f6..8d81d8b 100644
--- a/io/channel-socket.c
+++ b/io/channel-socket.c
@@ -22,7 +22,7 @@
 #include "qapi/error.h"
 #include "io/channel-socket.h"
 #include "io/channel-watch.h"
-#include "trace.h"
+#include "io/trace.h"
 #include "qapi/clone-visitor.h"
 
 #define SOCKET_MAX_FDS 16
diff --git a/io/channel-tls.c b/io/channel-tls.c
index d24dc8c..a77a6fd 100644
--- a/io/channel-tls.c
+++ b/io/channel-tls.c
@@ -21,7 +21,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "io/channel-tls.h"
-#include "trace.h"
+#include "io/trace.h"
 
 
 static ssize_t qio_channel_tls_write_handler(const char *buf,
diff --git a/io/channel-websock.c b/io/channel-websock.c
index f45bced..4fa5385 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -23,7 +23,7 @@
 #include "qemu/bswap.h"
 #include "io/channel-websock.h"
 #include "crypto/hash.h"
-#include "trace.h"
+#include "io/trace.h"
 
 
 /* Max amount to allow in rawinput/rawoutput buffers */
diff --git a/io/task.c b/io/task.c
index c7f97a9..d81adf2 100644
--- a/io/task.c
+++ b/io/task.c
@@ -22,7 +22,7 @@
 #include "io/task.h"
 #include "qapi/error.h"
 #include "qemu/thread.h"
-#include "trace.h"
+#include "io/trace.h"
 
 struct QIOTask {
     Object *source;
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 03/47] trace: switch util/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
  2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 01/47] trace: introduce some Makefile rules for module code gen Daniel P. Berrange
  2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file Daniel P. Berrange
@ 2017-01-06 15:54 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 04/47] trace: switch crypto/ " Daniel P. Berrange
                   ` (45 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the util/ directory to include the
util/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs              | 2 +-
 util/Makefile.objs         | 2 ++
 util/buffer.c              | 2 +-
 util/hbitmap.c             | 2 +-
 util/oslib-posix.c         | 2 +-
 util/oslib-win32.c         | 2 +-
 util/qemu-coroutine-lock.c | 2 +-
 util/qemu-coroutine.c      | 2 +-
 8 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index c3f1e45..e8f060e 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -120,7 +120,7 @@ ivshmem-server-obj-y = contrib/ivshmem-server/
 ######################################################################
 trace-events-subdirs =
 trace-events-y = trace-events
-trace-events-y += util/trace-events
+trace-events-subdirs += util
 trace-events-y += crypto/trace-events
 trace-events-subdirs += io
 trace-events-y += migration/trace-events
diff --git a/util/Makefile.objs b/util/Makefile.objs
index ad0f9c7..d196876 100644
--- a/util/Makefile.objs
+++ b/util/Makefile.objs
@@ -36,3 +36,5 @@ util-obj-y += log.o
 util-obj-y += qdist.o
 util-obj-y += qht.o
 util-obj-y += range.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/util/buffer.c b/util/buffer.c
index d8bb874..f59aef9 100644
--- a/util/buffer.c
+++ b/util/buffer.c
@@ -21,7 +21,7 @@
 #include "qemu/osdep.h"
 #include "qemu/host-utils.h"
 #include "qemu/buffer.h"
-#include "trace.h"
+#include "util/trace.h"
 
 #define BUFFER_MIN_INIT_SIZE     4096
 #define BUFFER_MIN_SHRINK_SIZE  65536
diff --git a/util/hbitmap.c b/util/hbitmap.c
index 9f691b7..32bb356 100644
--- a/util/hbitmap.c
+++ b/util/hbitmap.c
@@ -12,7 +12,7 @@
 #include "qemu/osdep.h"
 #include "qemu/hbitmap.h"
 #include "qemu/host-utils.h"
-#include "trace.h"
+#include "util/trace.h"
 
 /* HBitmaps provides an array of bits.  The bits are stored as usual in an
  * array of unsigned longs, but HBitmap is also optimized to provide fast
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index f631464..155309e 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -32,7 +32,7 @@
 #include <glib/gprintf.h>
 
 #include "sysemu/sysemu.h"
-#include "trace.h"
+#include "util/trace.h"
 #include "qapi/error.h"
 #include "qemu/sockets.h"
 #include <libgen.h>
diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index d09863c..6ae1681 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -34,7 +34,7 @@
 #include "qapi/error.h"
 #include "sysemu/sysemu.h"
 #include "qemu/main-loop.h"
-#include "trace.h"
+#include "util/trace.h"
 #include "qemu/sockets.h"
 #include "qemu/cutils.h"
 
diff --git a/util/qemu-coroutine-lock.c b/util/qemu-coroutine-lock.c
index 14cf9ce..9e24b66 100644
--- a/util/qemu-coroutine-lock.c
+++ b/util/qemu-coroutine-lock.c
@@ -27,7 +27,7 @@
 #include "qemu/coroutine.h"
 #include "qemu/coroutine_int.h"
 #include "qemu/queue.h"
-#include "trace.h"
+#include "util/trace.h"
 
 void qemu_co_queue_init(CoQueue *queue)
 {
diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c
index 737bffa..8f67487 100644
--- a/util/qemu-coroutine.c
+++ b/util/qemu-coroutine.c
@@ -13,7 +13,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "trace.h"
+#include "util/trace.h"
 #include "qemu-common.h"
 #include "qemu/thread.h"
 #include "qemu/atomic.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 04/47] trace: switch crypto/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (2 preceding siblings ...)
  2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 03/47] trace: switch util/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 05/47] trace: switch migration/ " Daniel P. Berrange
                   ` (44 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the crypto/ directory to include the
crypto/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs         | 2 +-
 crypto/Makefile.objs  | 2 ++
 crypto/secret.c       | 2 +-
 crypto/tlscreds.c     | 2 +-
 crypto/tlscredsanon.c | 2 +-
 crypto/tlscredsx509.c | 2 +-
 crypto/tlssession.c   | 2 +-
 7 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index e8f060e..735c4a9 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -121,7 +121,7 @@ ivshmem-server-obj-y = contrib/ivshmem-server/
 trace-events-subdirs =
 trace-events-y = trace-events
 trace-events-subdirs += util
-trace-events-y += crypto/trace-events
+trace-events-subdirs += crypto
 trace-events-subdirs += io
 trace-events-y += migration/trace-events
 trace-events-y += block/trace-events
diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs
index 1f749f2..3cd9da0 100644
--- a/crypto/Makefile.objs
+++ b/crypto/Makefile.objs
@@ -30,6 +30,8 @@ crypto-obj-y += xts.o
 crypto-obj-y += block.o
 crypto-obj-y += block-qcow.o
 crypto-obj-y += block-luks.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
 
 # Let the userspace emulators avoid linking gnutls/etc
 crypto-aes-obj-y = aes.o
diff --git a/crypto/secret.c b/crypto/secret.c
index 285ab7a..b936615 100644
--- a/crypto/secret.c
+++ b/crypto/secret.c
@@ -24,7 +24,7 @@
 #include "qapi/error.h"
 #include "qom/object_interfaces.h"
 #include "qemu/base64.h"
-#include "trace.h"
+#include "crypto/trace.h"
 
 
 static void
diff --git a/crypto/tlscreds.c b/crypto/tlscreds.c
index a896553..7e7f974 100644
--- a/crypto/tlscreds.c
+++ b/crypto/tlscreds.c
@@ -21,7 +21,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "crypto/tlscredspriv.h"
-#include "trace.h"
+#include "crypto/trace.h"
 
 #define DH_BITS 2048
 
diff --git a/crypto/tlscredsanon.c b/crypto/tlscredsanon.c
index 1464220..c94c09b 100644
--- a/crypto/tlscredsanon.c
+++ b/crypto/tlscredsanon.c
@@ -23,7 +23,7 @@
 #include "crypto/tlscredspriv.h"
 #include "qapi/error.h"
 #include "qom/object_interfaces.h"
-#include "trace.h"
+#include "crypto/trace.h"
 
 
 #ifdef CONFIG_GNUTLS
diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c
index 50eb54f..2a4c3bc 100644
--- a/crypto/tlscredsx509.c
+++ b/crypto/tlscredsx509.c
@@ -24,7 +24,7 @@
 #include "crypto/secret.h"
 #include "qapi/error.h"
 #include "qom/object_interfaces.h"
-#include "trace.h"
+#include "crypto/trace.h"
 
 
 #ifdef CONFIG_GNUTLS
diff --git a/crypto/tlssession.c b/crypto/tlssession.c
index 96a02de..95a6bda 100644
--- a/crypto/tlssession.c
+++ b/crypto/tlssession.c
@@ -24,7 +24,7 @@
 #include "crypto/tlscredsx509.h"
 #include "qapi/error.h"
 #include "qemu/acl.h"
-#include "trace.h"
+#include "crypto/trace.h"
 
 #ifdef CONFIG_GNUTLS
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 05/47] trace: switch migration/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (3 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 04/47] trace: switch crypto/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 06/47] trace: switch block/ " Daniel P. Berrange
                   ` (43 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the migration/ directory to include the
migration/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs            | 2 +-
 migration/Makefile.objs  | 2 ++
 migration/exec.c         | 2 +-
 migration/fd.c           | 2 +-
 migration/migration.c    | 2 +-
 migration/postcopy-ram.c | 2 +-
 migration/qemu-file.c    | 2 +-
 migration/ram.c          | 2 +-
 migration/rdma.c         | 2 +-
 migration/savevm.c       | 2 +-
 migration/socket.c       | 2 +-
 migration/tls.c          | 2 +-
 migration/vmstate.c      | 2 +-
 13 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 735c4a9..91878dd 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -123,7 +123,7 @@ trace-events-y = trace-events
 trace-events-subdirs += util
 trace-events-subdirs += crypto
 trace-events-subdirs += io
-trace-events-y += migration/trace-events
+trace-events-subdirs += migration
 trace-events-y += block/trace-events
 trace-events-y += hw/block/trace-events
 trace-events-y += hw/char/trace-events
diff --git a/migration/Makefile.objs b/migration/Makefile.objs
index 3f3e237..d0330f0 100644
--- a/migration/Makefile.objs
+++ b/migration/Makefile.objs
@@ -12,3 +12,5 @@ common-obj-$(CONFIG_RDMA) += rdma.o
 
 common-obj-y += block.o
 
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/migration/exec.c b/migration/exec.c
index 9157721..f8f6ccf 100644
--- a/migration/exec.c
+++ b/migration/exec.c
@@ -22,7 +22,7 @@
 #include "qemu-common.h"
 #include "migration/migration.h"
 #include "io/channel-command.h"
-#include "trace.h"
+#include "migration/trace.h"
 
 
 void exec_start_outgoing_migration(MigrationState *s, const char *command, Error **errp)
diff --git a/migration/fd.c b/migration/fd.c
index 58cb51a..695373b 100644
--- a/migration/fd.c
+++ b/migration/fd.c
@@ -20,7 +20,7 @@
 #include "migration/migration.h"
 #include "monitor/monitor.h"
 #include "io/channel-util.h"
-#include "trace.h"
+#include "migration/trace.h"
 
 
 void fd_start_outgoing_migration(MigrationState *s, const char *fdname, Error **errp)
diff --git a/migration/migration.c b/migration/migration.c
index f498ab8..4bcf46d 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -29,7 +29,7 @@
 #include "migration/postcopy-ram.h"
 #include "qemu/thread.h"
 #include "qmp-commands.h"
-#include "trace.h"
+#include "migration/trace.h"
 #include "qapi-event.h"
 #include "qom/cpu.h"
 #include "exec/memory.h"
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index a40dddb..bf5ef8f 100644
--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -24,7 +24,7 @@
 #include "sysemu/sysemu.h"
 #include "sysemu/balloon.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "migration/trace.h"
 
 /* Arbitrary limit on size of each discard command,
  * keeps them around ~200 bytes
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index e9fae31..b2240cb 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -30,7 +30,7 @@
 #include "qemu/coroutine.h"
 #include "migration/migration.h"
 #include "migration/qemu-file.h"
-#include "trace.h"
+#include "migration/trace.h"
 
 #define IO_BUF_SIZE 32768
 #define MAX_IOV_SIZE MIN(IOV_MAX, 64)
diff --git a/migration/ram.c b/migration/ram.c
index a1c8089..3c20acb 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -40,7 +40,7 @@
 #include "exec/address-spaces.h"
 #include "migration/page_cache.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "migration/trace.h"
 #include "exec/ram_addr.h"
 #include "qemu/rcu_queue.h"
 #include "migration/colo.h"
diff --git a/migration/rdma.c b/migration/rdma.c
index 674ccab..defc2f9 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -29,7 +29,7 @@
 #include <netdb.h>
 #include <arpa/inet.h>
 #include <rdma/rdma_cma.h>
-#include "trace.h"
+#include "migration/trace.h"
 
 /*
  * Print and error on both the Monitor and the Log file.
diff --git a/migration/savevm.c b/migration/savevm.c
index 0363372..5b2f7bb 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -46,7 +46,7 @@
 #include "sysemu/cpus.h"
 #include "exec/memory.h"
 #include "qmp-commands.h"
-#include "trace.h"
+#include "migration/trace.h"
 #include "qemu/bitops.h"
 #include "qemu/iov.h"
 #include "block/snapshot.h"
diff --git a/migration/socket.c b/migration/socket.c
index 11f80b1..be70428 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -22,7 +22,7 @@
 #include "migration/migration.h"
 #include "migration/qemu-file.h"
 #include "io/channel-socket.h"
-#include "trace.h"
+#include "migration/trace.h"
 
 
 static SocketAddress *tcp_build_address(const char *host_port, Error **errp)
diff --git a/migration/tls.c b/migration/tls.c
index 49ca9a8..3f2d094 100644
--- a/migration/tls.c
+++ b/migration/tls.c
@@ -24,7 +24,7 @@
 #include "crypto/tlscreds.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "trace.h"
+#include "migration/trace.h"
 
 static QCryptoTLSCreds *
 migration_tls_get_creds(MigrationState *s,
diff --git a/migration/vmstate.c b/migration/vmstate.c
index 0bc9f35..737fcb6 100644
--- a/migration/vmstate.c
+++ b/migration/vmstate.c
@@ -5,7 +5,7 @@
 #include "migration/vmstate.h"
 #include "qemu/bitops.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "migration/trace.h"
 
 static void vmstate_subsection_save(QEMUFile *f, const VMStateDescription *vmsd,
                                     void *opaque, QJSON *vmdesc);
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 06/47] trace: switch block/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (4 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 05/47] trace: switch migration/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 07/47] trace: switch hw/block/ " Daniel P. Berrange
                   ` (42 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the block/ directory to include the
block/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs         | 2 +-
 block.c               | 2 +-
 block/Makefile.objs   | 2 ++
 block/backup.c        | 2 +-
 block/block-backend.c | 2 +-
 block/commit.c        | 2 +-
 block/dirty-bitmap.c  | 2 +-
 block/io.c            | 2 +-
 block/mirror.c        | 2 +-
 block/nfs.c           | 2 +-
 block/qcow2-cache.c   | 2 +-
 block/qcow2-cluster.c | 2 +-
 block/qcow2.c         | 2 +-
 block/qed-l2-cache.c  | 2 +-
 block/qed-table.c     | 2 +-
 block/qed.c           | 2 +-
 block/raw-posix.c     | 2 +-
 block/raw-win32.c     | 2 +-
 block/stream.c        | 2 +-
 blockdev.c            | 2 +-
 20 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 91878dd..8a6dfad 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -124,7 +124,7 @@ trace-events-subdirs += util
 trace-events-subdirs += crypto
 trace-events-subdirs += io
 trace-events-subdirs += migration
-trace-events-y += block/trace-events
+trace-events-subdirs += block
 trace-events-y += hw/block/trace-events
 trace-events-y += hw/char/trace-events
 trace-events-y += hw/intc/trace-events
diff --git a/block.c b/block.c
index 39ddea3..19b68f8 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/block/Makefile.objs b/block/Makefile.objs
index 67a036a..9f03d26 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -26,6 +26,8 @@ block-obj-y += backup.o
 block-obj-$(CONFIG_REPLICATION) += replication.o
 
 block-obj-y += crypto.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
 
 common-obj-y += stream.o
 
diff --git a/block/backup.c b/block/backup.c
index ea38733..9a1530d 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -13,7 +13,7 @@
 
 #include "qemu/osdep.h"
 
-#include "trace.h"
+#include "block/trace.h"
 #include "block/block.h"
 #include "block/block_int.h"
 #include "block/blockjob_int.h"
diff --git a/block/block-backend.c b/block/block-backend.c
index efbf398..3e2b096 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -19,7 +19,7 @@
 #include "sysemu/sysemu.h"
 #include "qapi-event.h"
 #include "qemu/id.h"
-#include "trace.h"
+#include "block/trace.h"
 
 /* Number of coroutines to reserve per attached device model */
 #define COROUTINE_POOL_RESERVATION 64
diff --git a/block/commit.c b/block/commit.c
index c284e85..3eb2e6c 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -13,7 +13,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "block/block_int.h"
 #include "block/blockjob_int.h"
 #include "qapi/error.h"
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 519737c..e4405ff 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -24,7 +24,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "block/block_int.h"
 #include "block/blockjob.h"
 
diff --git a/block/io.c b/block/io.c
index 4f00562..70e1941 100644
--- a/block/io.c
+++ b/block/io.c
@@ -23,7 +23,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "sysemu/block-backend.h"
 #include "block/blockjob.h"
 #include "block/block_int.h"
diff --git a/block/mirror.c b/block/mirror.c
index 301ba92..5df7232 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -12,7 +12,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "block/blockjob_int.h"
 #include "block/block_int.h"
 #include "sysemu/block-backend.h"
diff --git a/block/nfs.c b/block/nfs.c
index a564340..9399f4a 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -30,7 +30,7 @@
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "block/block_int.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "qemu/iov.h"
 #include "qemu/uri.h"
 #include "qemu/cutils.h"
diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
index 1d25147..104fb16 100644
--- a/block/qcow2-cache.c
+++ b/block/qcow2-cache.c
@@ -26,7 +26,7 @@
 #include "block/block_int.h"
 #include "qemu-common.h"
 #include "qcow2.h"
-#include "trace.h"
+#include "block/trace.h"
 
 typedef struct Qcow2CachedTable {
     int64_t  offset;
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 928c1e2..67e8f23 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -30,7 +30,7 @@
 #include "block/block_int.h"
 #include "block/qcow2.h"
 #include "qemu/bswap.h"
-#include "trace.h"
+#include "block/trace.h"
 
 int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size,
                         bool exact_size)
diff --git a/block/qcow2.c b/block/qcow2.c
index 96fb8a8..b9f72b4 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -33,7 +33,7 @@
 #include "qapi/util.h"
 #include "qapi/qmp/types.h"
 #include "qapi-event.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "qemu/option_int.h"
 #include "qemu/cutils.h"
 #include "qemu/bswap.h"
diff --git a/block/qed-l2-cache.c b/block/qed-l2-cache.c
index 5cba794..b413753 100644
--- a/block/qed-l2-cache.c
+++ b/block/qed-l2-cache.c
@@ -51,7 +51,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "qed.h"
 
 /* Each L2 holds 2GB so this let's us fully cache a 100GB disk */
diff --git a/block/qed-table.c b/block/qed-table.c
index ed443e2..eb173d6 100644
--- a/block/qed-table.c
+++ b/block/qed-table.c
@@ -13,7 +13,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "qemu/sockets.h" /* for EINPROGRESS on Windows */
 #include "qed.h"
 #include "qemu/bswap.h"
diff --git a/block/qed.c b/block/qed.c
index 1a7ef0a..91ec33c 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -16,7 +16,7 @@
 #include "qapi/error.h"
 #include "qemu/timer.h"
 #include "qemu/bswap.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "qed.h"
 #include "qapi/qmp/qerror.h"
 #include "migration/migration.h"
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 28b47d9..1145465 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -29,7 +29,7 @@
 #include "qemu/log.h"
 #include "block/block_int.h"
 #include "qemu/module.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "block/thread-pool.h"
 #include "qemu/iov.h"
 #include "block/raw-aio.h"
diff --git a/block/raw-win32.c b/block/raw-win32.c
index 800fabd..096ca54 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -28,7 +28,7 @@
 #include "block/block_int.h"
 #include "qemu/module.h"
 #include "block/raw-aio.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "block/thread-pool.h"
 #include "qemu/iov.h"
 #include "qapi/qmp/qstring.h"
diff --git a/block/stream.c b/block/stream.c
index 1523ba7..b82bd23 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -12,7 +12,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "trace.h"
+#include "block/trace.h"
 #include "block/block_int.h"
 #include "block/blockjob_int.h"
 #include "qapi/error.h"
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"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 07/47] trace: switch hw/block/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (5 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 06/47] trace: switch block/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 08/47] trace: switch hw/char/ " Daniel P. Berrange
                   ` (41 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/block/ directory to include the
hw/block/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs                   | 2 +-
 hw/block/Makefile.objs          | 2 ++
 hw/block/dataplane/virtio-blk.c | 2 +-
 hw/block/hd-geometry.c          | 2 +-
 hw/block/virtio-blk.c           | 2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 8a6dfad..90979b0 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -125,7 +125,7 @@ trace-events-subdirs += crypto
 trace-events-subdirs += io
 trace-events-subdirs += migration
 trace-events-subdirs += block
-trace-events-y += hw/block/trace-events
+trace-events-subdirs += hw/block
 trace-events-y += hw/char/trace-events
 trace-events-y += hw/intc/trace-events
 trace-events-y += hw/net/trace-events
diff --git a/hw/block/Makefile.objs b/hw/block/Makefile.objs
index d4c3ab7..a2f523d 100644
--- a/hw/block/Makefile.objs
+++ b/hw/block/Makefile.objs
@@ -8,6 +8,8 @@ common-obj-$(CONFIG_XEN_BACKEND) += xen_disk.o
 common-obj-$(CONFIG_ECC) += ecc.o
 common-obj-$(CONFIG_ONENAND) += onenand.o
 common-obj-$(CONFIG_NVME_PCI) += nvme.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
 
 obj-$(CONFIG_SH4) += tc58128.o
 
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index d1f9f63..70991f9 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -14,7 +14,7 @@
 
 #include "qemu/osdep.h"
 #include "qapi/error.h"
-#include "trace.h"
+#include "hw/block/trace.h"
 #include "qemu/iov.h"
 #include "qemu/thread.h"
 #include "qemu/error-report.h"
diff --git a/hw/block/hd-geometry.c b/hw/block/hd-geometry.c
index 57ad501..5d3691a 100644
--- a/hw/block/hd-geometry.c
+++ b/hw/block/hd-geometry.c
@@ -34,7 +34,7 @@
 #include "sysemu/block-backend.h"
 #include "qemu/bswap.h"
 #include "hw/block/block.h"
-#include "trace.h"
+#include "hw/block/trace.h"
 
 struct partition {
         uint8_t boot_ind;           /* 0x80 - active */
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 50bb0cb..69e9e2b 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -16,7 +16,7 @@
 #include "qemu-common.h"
 #include "qemu/iov.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "hw/block/trace.h"
 #include "hw/block/block.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 08/47] trace: switch hw/char/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (6 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 07/47] trace: switch hw/block/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 09/47] trace: switch hw/intc/ " Daniel P. Berrange
                   ` (40 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/char/ directory to include the
hw/char/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs               | 2 +-
 hw/char/Makefile.objs       | 2 ++
 hw/char/escc.c              | 2 +-
 hw/char/grlib_apbuart.c     | 2 +-
 hw/char/lm32_juart.c        | 2 +-
 hw/char/lm32_uart.c         | 2 +-
 hw/char/milkymist-uart.c    | 2 +-
 hw/char/virtio-console.c    | 2 +-
 hw/char/virtio-serial-bus.c | 2 +-
 9 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 90979b0..6cbee00 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -126,7 +126,7 @@ trace-events-subdirs += io
 trace-events-subdirs += migration
 trace-events-subdirs += block
 trace-events-subdirs += hw/block
-trace-events-y += hw/char/trace-events
+trace-events-subdirs += hw/char
 trace-events-y += hw/intc/trace-events
 trace-events-y += hw/net/trace-events
 trace-events-y += hw/virtio/trace-events
diff --git a/hw/char/Makefile.objs b/hw/char/Makefile.objs
index 69a553c..13db97f 100644
--- a/hw/char/Makefile.objs
+++ b/hw/char/Makefile.objs
@@ -26,5 +26,7 @@ common-obj-$(CONFIG_LM32) += lm32_juart.o
 common-obj-$(CONFIG_LM32) += lm32_uart.o
 common-obj-$(CONFIG_MILKYMIST) += milkymist-uart.o
 common-obj-$(CONFIG_SCLPCONSOLE) += sclpconsole.o sclpconsole-lm.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
 
 obj-$(CONFIG_VIRTIO) += virtio-serial-bus.o
diff --git a/hw/char/escc.c b/hw/char/escc.c
index d6662dc..c3b203f 100644
--- a/hw/char/escc.c
+++ b/hw/char/escc.c
@@ -29,7 +29,7 @@
 #include "sysemu/char.h"
 #include "ui/console.h"
 #include "ui/input.h"
-#include "trace.h"
+#include "hw/char/trace.h"
 
 /*
  * Chipset docs:
diff --git a/hw/char/grlib_apbuart.c b/hw/char/grlib_apbuart.c
index db686e6..6a1f253 100644
--- a/hw/char/grlib_apbuart.c
+++ b/hw/char/grlib_apbuart.c
@@ -26,7 +26,7 @@
 #include "hw/sysbus.h"
 #include "sysemu/char.h"
 
-#include "trace.h"
+#include "hw/char/trace.h"
 
 #define UART_REG_SIZE 20     /* Size of memory mapped registers */
 
diff --git a/hw/char/lm32_juart.c b/hw/char/lm32_juart.c
index f8c1e0d..ec60f66 100644
--- a/hw/char/lm32_juart.c
+++ b/hw/char/lm32_juart.c
@@ -20,7 +20,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/char/trace.h"
 #include "sysemu/char.h"
 
 #include "hw/char/lm32_juart.h"
diff --git a/hw/char/lm32_uart.c b/hw/char/lm32_uart.c
index 7f3597c..9304715 100644
--- a/hw/char/lm32_uart.c
+++ b/hw/char/lm32_uart.c
@@ -25,7 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/char/trace.h"
 #include "sysemu/char.h"
 #include "qemu/error-report.h"
 
diff --git a/hw/char/milkymist-uart.c b/hw/char/milkymist-uart.c
index ae8e2f3..b13504f 100644
--- a/hw/char/milkymist-uart.c
+++ b/hw/char/milkymist-uart.c
@@ -24,7 +24,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/char/trace.h"
 #include "sysemu/char.h"
 #include "qemu/error-report.h"
 
diff --git a/hw/char/virtio-console.c b/hw/char/virtio-console.c
index 776205b..4267861 100644
--- a/hw/char/virtio-console.c
+++ b/hw/char/virtio-console.c
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/char.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "hw/char/trace.h"
 #include "hw/virtio/virtio-serial.h"
 #include "qapi-event.h"
 
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index 7975c2c..bd6396f 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -25,7 +25,7 @@
 #include "qemu/error-report.h"
 #include "qemu/queue.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/char/trace.h"
 #include "hw/virtio/virtio-serial.h"
 #include "hw/virtio/virtio-access.h"
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 09/47] trace: switch hw/intc/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (7 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 08/47] trace: switch hw/char/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 10/47] trace: switch hw/net/ " Daniel P. Berrange
                   ` (39 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/intc/ directory to include the
hw/intc/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs              | 2 +-
 hw/intc/Makefile.objs      | 2 ++
 hw/intc/apic.c             | 2 +-
 hw/intc/apic_common.c      | 2 +-
 hw/intc/arm_gic.c          | 2 +-
 hw/intc/arm_gicv3_cpuif.c  | 2 +-
 hw/intc/arm_gicv3_dist.c   | 2 +-
 hw/intc/arm_gicv3_redist.c | 2 +-
 hw/intc/aspeed_vic.c       | 2 +-
 hw/intc/grlib_irqmp.c      | 2 +-
 hw/intc/lm32_pic.c         | 2 +-
 hw/intc/s390_flic.c        | 2 +-
 hw/intc/s390_flic_kvm.c    | 2 +-
 hw/intc/slavio_intctl.c    | 2 +-
 hw/intc/xics.c             | 2 +-
 hw/intc/xics_kvm.c         | 2 +-
 hw/intc/xics_spapr.c       | 2 +-
 17 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 6cbee00..6d30b53 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -127,7 +127,7 @@ trace-events-subdirs += migration
 trace-events-subdirs += block
 trace-events-subdirs += hw/block
 trace-events-subdirs += hw/char
-trace-events-y += hw/intc/trace-events
+trace-events-subdirs += hw/intc
 trace-events-y += hw/net/trace-events
 trace-events-y += hw/virtio/trace-events
 trace-events-y += hw/audio/trace-events
diff --git a/hw/intc/Makefile.objs b/hw/intc/Makefile.objs
index 2f44a2d..f718d66 100644
--- a/hw/intc/Makefile.objs
+++ b/hw/intc/Makefile.objs
@@ -19,6 +19,8 @@ common-obj-$(CONFIG_ARM_GIC) += arm_gicv3_redist.o
 common-obj-$(CONFIG_ARM_GIC) += arm_gicv3_its_common.o
 common-obj-$(CONFIG_OPENPIC) += openpic.o
 common-obj-y += intc.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
 
 obj-$(CONFIG_APIC) += apic.o apic_common.o
 obj-$(CONFIG_ARM_GIC_KVM) += arm_gic_kvm.o
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index fe15fb6..1b2ed92 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -25,7 +25,7 @@
 #include "hw/i386/ioapic.h"
 #include "hw/pci/msi.h"
 #include "qemu/host-utils.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 #include "hw/i386/pc.h"
 #include "hw/i386/apic-msidef.h"
 #include "qapi/error.h"
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index d78c885..000bc7c 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -25,7 +25,7 @@
 #include "qapi/visitor.h"
 #include "hw/i386/apic.h"
 #include "hw/i386/apic_internal.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 #include "sysemu/kvm.h"
 #include "hw/qdev.h"
 #include "hw/sysbus.h"
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index 521aac3..206f098 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -24,7 +24,7 @@
 #include "qapi/error.h"
 #include "qom/cpu.h"
 #include "qemu/log.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 
 //#define DEBUG_GIC
 
diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c
index 35e8eb3..d82e4c9 100644
--- a/hw/intc/arm_gicv3_cpuif.c
+++ b/hw/intc/arm_gicv3_cpuif.c
@@ -13,7 +13,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 #include "gicv3_internal.h"
 #include "cpu.h"
 
diff --git a/hw/intc/arm_gicv3_dist.c b/hw/intc/arm_gicv3_dist.c
index 3ea3dd0..dc405e9 100644
--- a/hw/intc/arm_gicv3_dist.c
+++ b/hw/intc/arm_gicv3_dist.c
@@ -11,7 +11,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 #include "gicv3_internal.h"
 
 /* The GICD_NSACR registers contain a two bit field for each interrupt which
diff --git a/hw/intc/arm_gicv3_redist.c b/hw/intc/arm_gicv3_redist.c
index 77e5cfa..f1a6b08 100644
--- a/hw/intc/arm_gicv3_redist.c
+++ b/hw/intc/arm_gicv3_redist.c
@@ -11,7 +11,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu/log.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 #include "gicv3_internal.h"
 
 static uint32_t mask_group(GICv3CPUState *cs, MemTxAttrs attrs)
diff --git a/hw/intc/aspeed_vic.c b/hw/intc/aspeed_vic.c
index 2370e74..c152d78 100644
--- a/hw/intc/aspeed_vic.c
+++ b/hw/intc/aspeed_vic.c
@@ -31,7 +31,7 @@
 #include "hw/intc/aspeed_vic.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 
 #define AVIC_NEW_BASE_OFFSET 0x80
 
diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c
index ac7e63f..26c89af 100644
--- a/hw/intc/grlib_irqmp.c
+++ b/hw/intc/grlib_irqmp.c
@@ -30,7 +30,7 @@
 
 #include "hw/sparc/grlib.h"
 
-#include "trace.h"
+#include "hw/intc/trace.h"
 #include "qapi/error.h"
 
 #define IRQMP_MAX_CPU 16
diff --git a/hw/intc/lm32_pic.c b/hw/intc/lm32_pic.c
index 09e1511..68dfb76 100644
--- a/hw/intc/lm32_pic.c
+++ b/hw/intc/lm32_pic.c
@@ -23,7 +23,7 @@
 #include "hw/i386/pc.h"
 #include "monitor/monitor.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 #include "hw/lm32/lm32_pic.h"
 #include "hw/intc/intc.h"
 
diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
index 6ab29ef..44d3ea4 100644
--- a/hw/intc/s390_flic.c
+++ b/hw/intc/s390_flic.c
@@ -15,7 +15,7 @@
 #include "hw/sysbus.h"
 #include "migration/qemu-file.h"
 #include "hw/s390x/s390_flic.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 
 S390FLICState *s390_get_flic(void)
 {
diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
index 21ac2e2..3ac885a 100644
--- a/hw/intc/s390_flic_kvm.c
+++ b/hw/intc/s390_flic_kvm.c
@@ -20,7 +20,7 @@
 #include "migration/qemu-file.h"
 #include "hw/s390x/s390_flic.h"
 #include "hw/s390x/adapter.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 
 #define FLIC_SAVE_INITIAL_SIZE getpagesize()
 #define FLIC_FAILED (-1UL)
diff --git a/hw/intc/slavio_intctl.c b/hw/intc/slavio_intctl.c
index 84e0bee..7ad8c80 100644
--- a/hw/intc/slavio_intctl.c
+++ b/hw/intc/slavio_intctl.c
@@ -27,7 +27,7 @@
 #include "monitor/monitor.h"
 #include "hw/sysbus.h"
 #include "hw/intc/intc.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 
 //#define DEBUG_IRQ_COUNT
 
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 095c16a..250b381 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -30,7 +30,7 @@
 #include "qemu-common.h"
 #include "cpu.h"
 #include "hw/hw.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 #include "qemu/timer.h"
 #include "hw/ppc/xics.h"
 #include "qemu/error-report.h"
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index 17694ea..d3f0341 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -30,7 +30,7 @@
 #include "qemu-common.h"
 #include "cpu.h"
 #include "hw/hw.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 #include "sysemu/kvm.h"
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/xics.h"
diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c
index 2e3f1c5..b953eee 100644
--- a/hw/intc/xics_spapr.c
+++ b/hw/intc/xics_spapr.c
@@ -28,7 +28,7 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "hw/hw.h"
-#include "trace.h"
+#include "hw/intc/trace.h"
 #include "qemu/timer.h"
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/xics.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 10/47] trace: switch hw/net/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (8 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 09/47] trace: switch hw/intc/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 11/47] trace: switch hw/virtio/ " Daniel P. Berrange
                   ` (38 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/net/ directory to include the
hw/net/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs               | 2 +-
 hw/net/Makefile.objs        | 3 +++
 hw/net/e1000e.c             | 2 +-
 hw/net/e1000e_core.c        | 2 +-
 hw/net/e1000x_common.c      | 2 +-
 hw/net/lance.c              | 2 +-
 hw/net/milkymist-minimac2.c | 2 +-
 hw/net/mipsnet.c            | 2 +-
 hw/net/net_rx_pkt.c         | 2 +-
 hw/net/opencores_eth.c      | 2 +-
 hw/net/pcnet-pci.c          | 2 +-
 hw/net/pcnet.c              | 2 +-
 12 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 6d30b53..9c0aefa 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -128,7 +128,7 @@ trace-events-subdirs += block
 trace-events-subdirs += hw/block
 trace-events-subdirs += hw/char
 trace-events-subdirs += hw/intc
-trace-events-y += hw/net/trace-events
+trace-events-subdirs += hw/net
 trace-events-y += hw/virtio/trace-events
 trace-events-y += hw/audio/trace-events
 trace-events-y += hw/misc/trace-events
diff --git a/hw/net/Makefile.objs b/hw/net/Makefile.objs
index 610ed3e..da244c2 100644
--- a/hw/net/Makefile.objs
+++ b/hw/net/Makefile.objs
@@ -43,3 +43,6 @@ common-obj-$(CONFIG_ROCKER) += rocker/rocker.o rocker/rocker_fp.o \
                                rocker/rocker_desc.o rocker/rocker_world.o \
                                rocker/rocker_of_dpa.o
 obj-$(call lnot,$(CONFIG_ROCKER)) += rocker/qmp-norocker.o
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index 4994e1c..9e68bdb 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -46,7 +46,7 @@
 #include "e1000x_common.h"
 #include "e1000e_core.h"
 
-#include "trace.h"
+#include "hw/net/trace.h"
 
 #define TYPE_E1000E "e1000e"
 #define E1000E(obj) OBJECT_CHECK(E1000EState, (obj), TYPE_E1000E)
diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c
index 2b11499..4304b6a 100644
--- a/hw/net/e1000e_core.c
+++ b/hw/net/e1000e_core.c
@@ -46,7 +46,7 @@
 #include "e1000x_common.h"
 #include "e1000e_core.h"
 
-#include "trace.h"
+#include "hw/net/trace.h"
 
 #define E1000E_MIN_XITR     (500) /* No more then 7813 interrupts per
                                      second according to spec 10.2.4.2 */
diff --git a/hw/net/e1000x_common.c b/hw/net/e1000x_common.c
index eb0e097..7b6cfa8 100644
--- a/hw/net/e1000x_common.c
+++ b/hw/net/e1000x_common.c
@@ -29,7 +29,7 @@
 
 #include "e1000x_common.h"
 
-#include "trace.h"
+#include "hw/net/trace.h"
 
 bool e1000x_rx_ready(PCIDevice *d, uint32_t *mac)
 {
diff --git a/hw/net/lance.c b/hw/net/lance.c
index 573d724..6e36f9f 100644
--- a/hw/net/lance.c
+++ b/hw/net/lance.c
@@ -42,7 +42,7 @@
 #include "qemu/sockets.h"
 #include "hw/sparc/sun4m.h"
 #include "pcnet.h"
-#include "trace.h"
+#include "hw/net/trace.h"
 #include "sysemu/sysemu.h"
 
 #define TYPE_LANCE "lance"
diff --git a/hw/net/milkymist-minimac2.c b/hw/net/milkymist-minimac2.c
index c3a12e1..0a0d43f 100644
--- a/hw/net/milkymist-minimac2.c
+++ b/hw/net/milkymist-minimac2.c
@@ -28,7 +28,7 @@
 #include "cpu.h" /* FIXME: why does this use TARGET_PAGE_ALIGN? */
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/net/trace.h"
 #include "net/net.h"
 #include "qemu/error-report.h"
 
diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c
index 5a63df7..5f8fd6a 100644
--- a/hw/net/mipsnet.c
+++ b/hw/net/mipsnet.c
@@ -1,7 +1,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "net/net.h"
-#include "trace.h"
+#include "hw/net/trace.h"
 #include "hw/sysbus.h"
 
 /* MIPSnet register offsets */
diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c
index 1019b50..9ec6e61 100644
--- a/hw/net/net_rx_pkt.c
+++ b/hw/net/net_rx_pkt.c
@@ -16,7 +16,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "trace.h"
+#include "hw/net/trace.h"
 #include "net_rx_pkt.h"
 #include "net/checksum.h"
 #include "net/tap.h"
diff --git a/hw/net/opencores_eth.c b/hw/net/opencores_eth.c
index 268d6a7..2a38c05 100644
--- a/hw/net/opencores_eth.c
+++ b/hw/net/opencores_eth.c
@@ -37,7 +37,7 @@
 #include "hw/sysbus.h"
 #include "net/net.h"
 #include "sysemu/sysemu.h"
-#include "trace.h"
+#include "hw/net/trace.h"
 
 /* RECSMALL is not used because it breaks tap networking in linux:
  * incoming ARP responses are too short
diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c
index 0acf8a4..6cfc121 100644
--- a/hw/net/pcnet-pci.c
+++ b/hw/net/pcnet-pci.c
@@ -34,7 +34,7 @@
 #include "qemu/timer.h"
 #include "sysemu/dma.h"
 #include "sysemu/sysemu.h"
-#include "trace.h"
+#include "hw/net/trace.h"
 
 #include "pcnet.h"
 
diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c
index 6544553..edba914 100644
--- a/hw/net/pcnet.c
+++ b/hw/net/pcnet.c
@@ -41,7 +41,7 @@
 #include "qemu/timer.h"
 #include "qemu/sockets.h"
 #include "sysemu/sysemu.h"
-#include "trace.h"
+#include "hw/net/trace.h"
 
 #include "pcnet.h"
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 11/47] trace: switch hw/virtio/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (9 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 10/47] trace: switch hw/net/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 12/47] trace: switch hw/audio/ " Daniel P. Berrange
                   ` (37 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/virtio/ directory to include the
hw/virtio/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs              | 2 +-
 hw/virtio/Makefile.objs    | 2 ++
 hw/virtio/virtio-balloon.c | 2 +-
 hw/virtio/virtio-rng.c     | 2 +-
 hw/virtio/virtio.c         | 2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 9c0aefa..f5ecfbf 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -129,7 +129,7 @@ trace-events-subdirs += hw/block
 trace-events-subdirs += hw/char
 trace-events-subdirs += hw/intc
 trace-events-subdirs += hw/net
-trace-events-y += hw/virtio/trace-events
+trace-events-subdirs += hw/virtio
 trace-events-y += hw/audio/trace-events
 trace-events-y += hw/misc/trace-events
 trace-events-y += hw/usb/trace-events
diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs
index 95c4c30..9e5a3a4 100644
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -2,6 +2,8 @@ common-obj-y += virtio-rng.o
 common-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
 common-obj-y += virtio-bus.o
 common-obj-y += virtio-mmio.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
 
 obj-y += virtio.o virtio-balloon.o 
 obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 884570a..ee6fccd 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -25,7 +25,7 @@
 #include "exec/address-spaces.h"
 #include "qapi/visitor.h"
 #include "qapi-event.h"
-#include "trace.h"
+#include "hw/virtio/trace.h"
 
 #include "hw/virtio/virtio-bus.h"
 #include "hw/virtio/virtio-access.h"
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 9639f4e..c19b186 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -17,7 +17,7 @@
 #include "hw/virtio/virtio-rng.h"
 #include "sysemu/rng.h"
 #include "qom/object_interfaces.h"
-#include "trace.h"
+#include "hw/virtio/trace.h"
 
 static bool is_guest_ready(VirtIORNG *vrng)
 {
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index d40711a..f7502c2 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -15,7 +15,7 @@
 #include "qapi/error.h"
 #include "qemu-common.h"
 #include "cpu.h"
-#include "trace.h"
+#include "hw/virtio/trace.h"
 #include "exec/address-spaces.h"
 #include "qemu/error-report.h"
 #include "hw/virtio/virtio.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 12/47] trace: switch hw/audio/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (10 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 11/47] trace: switch hw/virtio/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 13/47] trace: switch hw/misc/ " Daniel P. Berrange
                   ` (36 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/audio/ directory to include the
hw/audio/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs             | 2 +-
 hw/audio/Makefile.objs    | 3 +++
 hw/audio/cs4231.c         | 2 +-
 hw/audio/milkymist-ac97.c | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index f5ecfbf..41ab795 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -130,7 +130,7 @@ trace-events-subdirs += hw/char
 trace-events-subdirs += hw/intc
 trace-events-subdirs += hw/net
 trace-events-subdirs += hw/virtio
-trace-events-y += hw/audio/trace-events
+trace-events-subdirs += hw/audio
 trace-events-y += hw/misc/trace-events
 trace-events-y += hw/usb/trace-events
 trace-events-y += hw/scsi/trace-events
diff --git a/hw/audio/Makefile.objs b/hw/audio/Makefile.objs
index 7ce85a2..d779550 100644
--- a/hw/audio/Makefile.objs
+++ b/hw/audio/Makefile.objs
@@ -16,3 +16,6 @@ common-obj-$(CONFIG_MARVELL_88W8618) += marvell_88w8618.o
 common-obj-$(CONFIG_MILKYMIST) += milkymist-ac97.o
 
 $(obj)/adlib.o $(obj)/fmopl.o: QEMU_CFLAGS += -DBUILD_Y8950=0
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/audio/cs4231.c b/hw/audio/cs4231.c
index 30690f9..8c7eb1e 100644
--- a/hw/audio/cs4231.c
+++ b/hw/audio/cs4231.c
@@ -24,7 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/audio/trace.h"
 
 /*
  * In addition to Crystal CS4231 there is a DMA controller on Sparc.
diff --git a/hw/audio/milkymist-ac97.c b/hw/audio/milkymist-ac97.c
index bc8db71..fd994b4 100644
--- a/hw/audio/milkymist-ac97.c
+++ b/hw/audio/milkymist-ac97.c
@@ -24,7 +24,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/audio/trace.h"
 #include "audio/audio.h"
 #include "qemu/error-report.h"
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 13/47] trace: switch hw/misc/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (11 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 12/47] trace: switch hw/audio/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 14/47] trace: switch hw/usb/ " Daniel P. Berrange
                   ` (35 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/misc/ directory to include the
hw/misc/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs             | 2 +-
 hw/misc/Makefile.objs     | 3 +++
 hw/misc/aspeed_scu.c      | 2 +-
 hw/misc/eccmemctl.c       | 2 +-
 hw/misc/milkymist-hpdmc.c | 2 +-
 hw/misc/milkymist-pfpu.c  | 2 +-
 hw/misc/slavio_misc.c     | 2 +-
 7 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 41ab795..85c412a 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -131,7 +131,7 @@ trace-events-subdirs += hw/intc
 trace-events-subdirs += hw/net
 trace-events-subdirs += hw/virtio
 trace-events-subdirs += hw/audio
-trace-events-y += hw/misc/trace-events
+trace-events-subdirs += hw/misc
 trace-events-y += hw/usb/trace-events
 trace-events-y += hw/scsi/trace-events
 trace-events-y += hw/nvram/trace-events
diff --git a/hw/misc/Makefile.objs b/hw/misc/Makefile.objs
index 1a89615..ccee974 100644
--- a/hw/misc/Makefile.objs
+++ b/hw/misc/Makefile.objs
@@ -53,3 +53,6 @@ obj-$(CONFIG_EDU) += edu.o
 obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.o
 obj-$(CONFIG_AUX) += auxbus.o
 obj-$(CONFIG_ASPEED_SOC) += aspeed_scu.o aspeed_sdmc.o
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c
index 95022d3..36f50d1 100644
--- a/hw/misc/aspeed_scu.c
+++ b/hw/misc/aspeed_scu.c
@@ -16,7 +16,7 @@
 #include "qapi/visitor.h"
 #include "qemu/bitops.h"
 #include "qemu/log.h"
-#include "trace.h"
+#include "hw/misc/trace.h"
 
 #define TO_REG(offset) ((offset) >> 2)
 
diff --git a/hw/misc/eccmemctl.c b/hw/misc/eccmemctl.c
index a0071f3..a0424f9 100644
--- a/hw/misc/eccmemctl.c
+++ b/hw/misc/eccmemctl.c
@@ -24,7 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/misc/trace.h"
 
 /* There are 3 versions of this chip used in SMP sun4m systems:
  * MCC (version 0, implementation 0) SS-600MP
diff --git a/hw/misc/milkymist-hpdmc.c b/hw/misc/milkymist-hpdmc.c
index e6140ee..8596437 100644
--- a/hw/misc/milkymist-hpdmc.c
+++ b/hw/misc/milkymist-hpdmc.c
@@ -24,7 +24,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/misc/trace.h"
 #include "qemu/error-report.h"
 
 enum {
diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c
index 3ca2589..7921ab6 100644
--- a/hw/misc/milkymist-pfpu.c
+++ b/hw/misc/milkymist-pfpu.c
@@ -25,7 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/misc/trace.h"
 #include "qemu/log.h"
 #include "qemu/error-report.h"
 #include <math.h>
diff --git a/hw/misc/slavio_misc.c b/hw/misc/slavio_misc.c
index edd5de0..a4820c5 100644
--- a/hw/misc/slavio_misc.c
+++ b/hw/misc/slavio_misc.c
@@ -25,7 +25,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/misc/trace.h"
 
 /*
  * This is the auxio port, chip control and system control part of
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 14/47] trace: switch hw/usb/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (12 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 13/47] trace: switch hw/misc/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 15/47] trace: switch hw/scsi/ " Daniel P. Berrange
                   ` (34 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/usb/ directory to include the
hw/usb/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs            | 2 +-
 hw/usb/Makefile.objs     | 3 +++
 hw/usb/bus.c             | 2 +-
 hw/usb/combined-packet.c | 2 +-
 hw/usb/core.c            | 2 +-
 hw/usb/desc.c            | 2 +-
 hw/usb/dev-hub.c         | 2 +-
 hw/usb/dev-mtp.c         | 2 +-
 hw/usb/dev-uas.c         | 2 +-
 hw/usb/hcd-ehci.c        | 2 +-
 hw/usb/hcd-ohci.c        | 2 +-
 hw/usb/hcd-uhci.c        | 2 +-
 hw/usb/hcd-xhci.c        | 2 +-
 hw/usb/host-libusb.c     | 2 +-
 14 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 85c412a..a71e25b 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -132,7 +132,7 @@ trace-events-subdirs += hw/net
 trace-events-subdirs += hw/virtio
 trace-events-subdirs += hw/audio
 trace-events-subdirs += hw/misc
-trace-events-y += hw/usb/trace-events
+trace-events-subdirs += hw/usb
 trace-events-y += hw/scsi/trace-events
 trace-events-y += hw/nvram/trace-events
 trace-events-y += hw/display/trace-events
diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs
index 98b5c9d..c7b85c4 100644
--- a/hw/usb/Makefile.objs
+++ b/hw/usb/Makefile.objs
@@ -42,3 +42,6 @@ common-obj-y += $(patsubst %,host-%.o,$(HOST_USB))
 ifeq ($(CONFIG_USB_LIBUSB),y)
 common-obj-$(CONFIG_XEN_BACKEND) += xen-usb.o
 endif
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index 25913ad..e41cf29 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -6,7 +6,7 @@
 #include "qemu/error-report.h"
 #include "sysemu/sysemu.h"
 #include "monitor/monitor.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 #include "qemu/cutils.h"
 
 static void usb_bus_dev_print(Monitor *mon, DeviceState *qdev, int indent);
diff --git a/hw/usb/combined-packet.c b/hw/usb/combined-packet.c
index 48cac87..fb5b87f 100644
--- a/hw/usb/combined-packet.c
+++ b/hw/usb/combined-packet.c
@@ -23,7 +23,7 @@
 #include "qemu-common.h"
 #include "hw/usb.h"
 #include "qemu/iov.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 
 static void usb_combined_packet_add(USBCombinedPacket *combined, USBPacket *p)
 {
diff --git a/hw/usb/core.c b/hw/usb/core.c
index 45fa00c..68668c3 100644
--- a/hw/usb/core.c
+++ b/hw/usb/core.c
@@ -27,7 +27,7 @@
 #include "qemu-common.h"
 #include "hw/usb.h"
 #include "qemu/iov.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 
 void usb_pick_speed(USBPort *port)
 {
diff --git a/hw/usb/desc.c b/hw/usb/desc.c
index 7828e52..64341c6 100644
--- a/hw/usb/desc.c
+++ b/hw/usb/desc.c
@@ -2,7 +2,7 @@
 
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 
 /* ------------------------------------------------------------------ */
 
diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c
index a33f21c..5359688 100644
--- a/hw/usb/dev-hub.c
+++ b/hw/usb/dev-hub.c
@@ -24,7 +24,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
 #include "qemu/error-report.h"
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 9cb0f50..d11f0fc 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -22,7 +22,7 @@
 
 #include "qemu-common.h"
 #include "qemu/iov.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
 
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index 3a8ff18..46efc5a 100644
--- a/hw/usb/dev-uas.c
+++ b/hw/usb/dev-uas.c
@@ -13,7 +13,7 @@
 #include "qemu-common.h"
 #include "qemu/option.h"
 #include "qemu/config-file.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 #include "qemu/error-report.h"
 
 #include "hw/usb.h"
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 7622a3a..67c17c9 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -31,7 +31,7 @@
 #include "qapi/error.h"
 #include "hw/usb/ehci-regs.h"
 #include "hw/usb/hcd-ehci.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 
 #define FRAME_TIMER_FREQ 1000
 #define FRAME_TIMER_NS   (NANOSECONDS_PER_SECOND / FRAME_TIMER_FREQ)
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index c82a92f..864b711 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -33,7 +33,7 @@
 #include "hw/pci/pci.h"
 #include "hw/sysbus.h"
 #include "hw/qdev-dma.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 
 /* This causes frames to occur 1000x slower */
 //#define OHCI_TIME_WARP 1
diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c
index ca72a80..ee7de68 100644
--- a/hw/usb/hcd-uhci.c
+++ b/hw/usb/hcd-uhci.c
@@ -34,7 +34,7 @@
 #include "qemu/timer.h"
 #include "qemu/iov.h"
 #include "sysemu/dma.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 #include "qemu/main-loop.h"
 
 #define FRAME_TIMER_FREQ 1000
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 4acf0c6..671e2b2 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -26,7 +26,7 @@
 #include "hw/pci/pci.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 #include "qapi/error.h"
 
 //#define DEBUG_XHCI
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index bd81d71..131fbb3 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -44,7 +44,7 @@
 #include "monitor/monitor.h"
 #include "qemu/error-report.h"
 #include "sysemu/sysemu.h"
-#include "trace.h"
+#include "hw/usb/trace.h"
 
 #include "hw/usb.h"
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 15/47] trace: switch hw/scsi/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (13 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 14/47] trace: switch hw/usb/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 16/47] trace: switch hw/nvram/ " Daniel P. Berrange
                   ` (33 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/scsi/ directory to include the
hw/scsi/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs         | 2 +-
 hw/scsi/Makefile.objs | 3 +++
 hw/scsi/esp-pci.c     | 2 +-
 hw/scsi/esp.c         | 2 +-
 hw/scsi/megasas.c     | 2 +-
 hw/scsi/mptconfig.c   | 2 +-
 hw/scsi/mptendian.c   | 2 +-
 hw/scsi/mptsas.c      | 2 +-
 hw/scsi/scsi-bus.c    | 2 +-
 hw/scsi/vmw_pvscsi.c  | 2 +-
 10 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index a71e25b..0d3b37a 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -133,7 +133,7 @@ trace-events-subdirs += hw/virtio
 trace-events-subdirs += hw/audio
 trace-events-subdirs += hw/misc
 trace-events-subdirs += hw/usb
-trace-events-y += hw/scsi/trace-events
+trace-events-subdirs += hw/scsi
 trace-events-y += hw/nvram/trace-events
 trace-events-y += hw/display/trace-events
 trace-events-y += hw/input/trace-events
diff --git a/hw/scsi/Makefile.objs b/hw/scsi/Makefile.objs
index 5a2248b..cdf229b 100644
--- a/hw/scsi/Makefile.objs
+++ b/hw/scsi/Makefile.objs
@@ -12,3 +12,6 @@ ifeq ($(CONFIG_VIRTIO),y)
 obj-y += virtio-scsi.o virtio-scsi-dataplane.o
 obj-$(CONFIG_VHOST_SCSI) += vhost-scsi.o
 endif
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c
index 595f88b..1a94cb7 100644
--- a/hw/scsi/esp-pci.c
+++ b/hw/scsi/esp-pci.c
@@ -27,7 +27,7 @@
 #include "hw/pci/pci.h"
 #include "hw/nvram/eeprom93xx.h"
 #include "hw/scsi/esp.h"
-#include "trace.h"
+#include "hw/scsi/trace.h"
 #include "qapi/error.h"
 #include "qemu/log.h"
 
diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c
index 5a5a4e9..297b5cf 100644
--- a/hw/scsi/esp.c
+++ b/hw/scsi/esp.c
@@ -26,7 +26,7 @@
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
 #include "hw/scsi/esp.h"
-#include "trace.h"
+#include "hw/scsi/trace.h"
 #include "qapi/error.h"
 #include "qemu/log.h"
 
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 67fc1e7..0874750 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -28,7 +28,7 @@
 #include "qemu/iov.h"
 #include "hw/scsi/scsi.h"
 #include "block/scsi.h"
-#include "trace.h"
+#include "hw/scsi/trace.h"
 #include "qapi/error.h"
 #include "mfi.h"
 
diff --git a/hw/scsi/mptconfig.c b/hw/scsi/mptconfig.c
index 87a416a..637c261 100644
--- a/hw/scsi/mptconfig.c
+++ b/hw/scsi/mptconfig.c
@@ -22,7 +22,7 @@
 
 #include "mptsas.h"
 #include "mpi.h"
-#include "trace.h"
+#include "hw/scsi/trace.h"
 
 /* Generic functions for marshaling and unmarshaling.  */
 
diff --git a/hw/scsi/mptendian.c b/hw/scsi/mptendian.c
index b7fe2a2..1584246 100644
--- a/hw/scsi/mptendian.c
+++ b/hw/scsi/mptendian.c
@@ -29,7 +29,7 @@
 #include "qemu/iov.h"
 #include "hw/scsi/scsi.h"
 #include "block/scsi.h"
-#include "trace.h"
+#include "hw/scsi/trace.h"
 
 #include "mptsas.h"
 #include "mpi.h"
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index ad87e78..01f1637 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -31,7 +31,7 @@
 #include "qemu/iov.h"
 #include "hw/scsi/scsi.h"
 #include "block/scsi.h"
-#include "trace.h"
+#include "hw/scsi/trace.h"
 #include "qapi/error.h"
 #include "mptsas.h"
 #include "mpi.h"
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 297216d..e79721c 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -7,7 +7,7 @@
 #include "hw/qdev.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
-#include "trace.h"
+#include "hw/scsi/trace.h"
 #include "sysemu/dma.h"
 #include "qemu/cutils.h"
 
diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index a5ce7de..b96e4ad 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -31,7 +31,7 @@
 #include "block/scsi.h"
 #include "hw/pci/msi.h"
 #include "vmw_pvscsi.h"
-#include "trace.h"
+#include "hw/scsi/trace.h"
 
 
 #define PVSCSI_USE_64BIT         (true)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 16/47] trace: switch hw/nvram/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (14 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 15/47] trace: switch hw/scsi/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 17/47] trace: switch hw/display/ " Daniel P. Berrange
                   ` (32 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/nvram/ directory to include the
hw/nvram/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs          | 2 +-
 hw/nvram/Makefile.objs | 2 ++
 hw/nvram/ds1225y.c     | 2 +-
 hw/nvram/fw_cfg.c      | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 0d3b37a..a08e1f9 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -134,7 +134,7 @@ trace-events-subdirs += hw/audio
 trace-events-subdirs += hw/misc
 trace-events-subdirs += hw/usb
 trace-events-subdirs += hw/scsi
-trace-events-y += hw/nvram/trace-events
+trace-events-subdirs += hw/nvram
 trace-events-y += hw/display/trace-events
 trace-events-y += hw/input/trace-events
 trace-events-y += hw/timer/trace-events
diff --git a/hw/nvram/Makefile.objs b/hw/nvram/Makefile.objs
index c018f6b..212c4cc 100644
--- a/hw/nvram/Makefile.objs
+++ b/hw/nvram/Makefile.objs
@@ -4,3 +4,5 @@ common-obj-y += fw_cfg.o
 common-obj-y += chrp_nvram.o
 common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
 obj-$(CONFIG_PSERIES) += spapr_nvram.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/nvram/ds1225y.c b/hw/nvram/ds1225y.c
index 57d5ab2..cb4d4cc 100644
--- a/hw/nvram/ds1225y.c
+++ b/hw/nvram/ds1225y.c
@@ -24,7 +24,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/nvram/trace.h"
 
 typedef struct {
     MemoryRegion iomem;
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index 3ebecb2..0247171 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -29,7 +29,7 @@
 #include "hw/isa/isa.h"
 #include "hw/nvram/fw_cfg.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/nvram/trace.h"
 #include "qemu/error-report.h"
 #include "qemu/config-file.h"
 #include "qemu/cutils.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 17/47] trace: switch hw/display/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (15 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 16/47] trace: switch hw/nvram/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 18/47] trace: switch hw/input/ " Daniel P. Berrange
                   ` (31 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/display/ directory to include the
hw/display/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs                | 2 +-
 hw/display/Makefile.objs     | 3 +++
 hw/display/g364fb.c          | 2 +-
 hw/display/jazz_led.c        | 2 +-
 hw/display/milkymist-tmu2.c  | 2 +-
 hw/display/milkymist-vgafb.c | 2 +-
 hw/display/qxl-render.c      | 2 +-
 hw/display/qxl.c             | 2 +-
 hw/display/vga.c             | 2 +-
 hw/display/virtio-gpu-3d.c   | 2 +-
 hw/display/virtio-gpu.c      | 2 +-
 hw/display/vmware_vga.c      | 2 +-
 hw/display/xenfb.c           | 2 +-
 13 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index a08e1f9..11f7b0d 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -135,7 +135,7 @@ trace-events-subdirs += hw/misc
 trace-events-subdirs += hw/usb
 trace-events-subdirs += hw/scsi
 trace-events-subdirs += hw/nvram
-trace-events-y += hw/display/trace-events
+trace-events-subdirs += hw/display
 trace-events-y += hw/input/trace-events
 trace-events-y += hw/timer/trace-events
 trace-events-y += hw/dma/trace-events
diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
index 063889b..8279083 100644
--- a/hw/display/Makefile.objs
+++ b/hw/display/Makefile.objs
@@ -45,3 +45,6 @@ virtio-gpu-3d.o-cflags := $(VIRGL_CFLAGS)
 virtio-gpu-3d.o-libs += $(VIRGL_LIBS)
 obj-$(CONFIG_DPCD) += dpcd.o
 obj-$(CONFIG_XLNX_ZYNQMP) += xlnx_dp.o
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c
index 70ef2c7..5342e07 100644
--- a/hw/display/g364fb.c
+++ b/hw/display/g364fb.c
@@ -22,7 +22,7 @@
 #include "qemu/error-report.h"
 #include "ui/console.h"
 #include "ui/pixel_ops.h"
-#include "trace.h"
+#include "hw/display/trace.h"
 #include "hw/sysbus.h"
 
 typedef struct G364State {
diff --git a/hw/display/jazz_led.c b/hw/display/jazz_led.c
index b72fdb1..a11125c 100644
--- a/hw/display/jazz_led.c
+++ b/hw/display/jazz_led.c
@@ -26,7 +26,7 @@
 #include "qemu-common.h"
 #include "ui/console.h"
 #include "ui/pixel_ops.h"
-#include "trace.h"
+#include "hw/display/trace.h"
 #include "hw/sysbus.h"
 
 typedef enum {
diff --git a/hw/display/milkymist-tmu2.c b/hw/display/milkymist-tmu2.c
index 5c666f9..bb7016a 100644
--- a/hw/display/milkymist-tmu2.c
+++ b/hw/display/milkymist-tmu2.c
@@ -27,7 +27,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/display/trace.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 
diff --git a/hw/display/milkymist-vgafb.c b/hw/display/milkymist-vgafb.c
index 177fdac..2180e6d 100644
--- a/hw/display/milkymist-vgafb.c
+++ b/hw/display/milkymist-vgafb.c
@@ -25,7 +25,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/display/trace.h"
 #include "ui/console.h"
 #include "framebuffer.h"
 #include "ui/pixel_ops.h"
diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c
index 9ad9d9e..d1f0db3 100644
--- a/hw/display/qxl-render.c
+++ b/hw/display/qxl-render.c
@@ -21,7 +21,7 @@
 
 #include "qemu/osdep.h"
 #include "qxl.h"
-#include "trace.h"
+#include "hw/display/trace.h"
 
 static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect)
 {
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 62d0c80..50f12ae 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -26,7 +26,7 @@
 #include "qemu/queue.h"
 #include "qemu/atomic.h"
 #include "sysemu/sysemu.h"
-#include "trace.h"
+#include "hw/display/trace.h"
 
 #include "qxl.h"
 
diff --git a/hw/display/vga.c b/hw/display/vga.c
index 2a88b3c..8dafd26 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -32,7 +32,7 @@
 #include "ui/pixel_ops.h"
 #include "qemu/timer.h"
 #include "hw/xen/xen.h"
-#include "trace.h"
+#include "hw/display/trace.h"
 
 //#define DEBUG_VGA
 //#define DEBUG_VGA_MEM
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index b13ced3..ba98d1f 100644
--- a/hw/display/virtio-gpu-3d.c
+++ b/hw/display/virtio-gpu-3d.c
@@ -14,7 +14,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu/iov.h"
-#include "trace.h"
+#include "hw/display/trace.h"
 #include "hw/virtio/virtio.h"
 #include "hw/virtio/virtio-gpu.h"
 #include "qapi/error.h"
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index ca88cf4..8aff8a9 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -15,7 +15,7 @@
 #include "qemu-common.h"
 #include "qemu/iov.h"
 #include "ui/console.h"
-#include "trace.h"
+#include "hw/display/trace.h"
 #include "hw/virtio/virtio.h"
 #include "hw/virtio/virtio-gpu.h"
 #include "hw/virtio/virtio-bus.h"
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index 6599cf0..8974181 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -25,7 +25,7 @@
 #include "qapi/error.h"
 #include "hw/hw.h"
 #include "hw/loader.h"
-#include "trace.h"
+#include "hw/display/trace.h"
 #include "ui/console.h"
 #include "ui/vnc.h"
 #include "hw/pci/pci.h"
diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index 7a8727a..7c1f93f 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -36,7 +36,7 @@
 #include <xen/io/kbdif.h>
 #include <xen/io/protocols.h>
 
-#include "trace.h"
+#include "hw/display/trace.h"
 
 #ifndef BTN_LEFT
 #define BTN_LEFT 0x110 /* from <linux/input.h> */
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 18/47] trace: switch hw/input/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (16 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 17/47] trace: switch hw/display/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 19/47] trace: switch hw/timer/ " Daniel P. Berrange
                   ` (30 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/input/ directory to include the
hw/input/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs                | 2 +-
 hw/input/Makefile.objs       | 3 +++
 hw/input/hid.c               | 2 +-
 hw/input/milkymist-softusb.c | 2 +-
 hw/input/ps2.c               | 2 +-
 hw/input/virtio-input.c      | 2 +-
 6 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 11f7b0d..3ae5085 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -136,7 +136,7 @@ trace-events-subdirs += hw/usb
 trace-events-subdirs += hw/scsi
 trace-events-subdirs += hw/nvram
 trace-events-subdirs += hw/display
-trace-events-y += hw/input/trace-events
+trace-events-subdirs += hw/input
 trace-events-y += hw/timer/trace-events
 trace-events-y += hw/dma/trace-events
 trace-events-y += hw/sparc/trace-events
diff --git a/hw/input/Makefile.objs b/hw/input/Makefile.objs
index 7715d72..fc40638 100644
--- a/hw/input/Makefile.objs
+++ b/hw/input/Makefile.objs
@@ -17,3 +17,6 @@ endif
 obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o
 obj-$(CONFIG_PXA2XX) += pxa2xx_keypad.o
 obj-$(CONFIG_TSC210X) += tsc210x.o
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/input/hid.c b/hw/input/hid.c
index fa9cc4c..beb595b 100644
--- a/hw/input/hid.c
+++ b/hw/input/hid.c
@@ -27,7 +27,7 @@
 #include "ui/console.h"
 #include "qemu/timer.h"
 #include "hw/input/hid.h"
-#include "trace.h"
+#include "hw/input/trace.h"
 
 #define HID_USAGE_ERROR_ROLLOVER        0x01
 #define HID_USAGE_POSTFAIL              0x02
diff --git a/hw/input/milkymist-softusb.c b/hw/input/milkymist-softusb.c
index 40dfca1..41f2211 100644
--- a/hw/input/milkymist-softusb.c
+++ b/hw/input/milkymist-softusb.c
@@ -25,7 +25,7 @@
 #include "qapi/error.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/input/trace.h"
 #include "ui/console.h"
 #include "hw/input/hid.h"
 #include "qemu/error-report.h"
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 0d14de0..845a546 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -29,7 +29,7 @@
 #include "ui/input.h"
 #include "sysemu/sysemu.h"
 
-#include "trace.h"
+#include "hw/input/trace.h"
 
 /* debug PC keyboard */
 //#define DEBUG_KBD
diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c
index b678ee9..517b583 100644
--- a/hw/input/virtio-input.c
+++ b/hw/input/virtio-input.c
@@ -7,7 +7,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu/iov.h"
-#include "trace.h"
+#include "hw/input/trace.h"
 
 #include "hw/qdev.h"
 #include "hw/virtio/virtio.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 19/47] trace: switch hw/timer/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (17 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 18/47] trace: switch hw/input/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 20/47] trace: switch hw/dma/ " Daniel P. Berrange
                   ` (29 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/timer/ directory to include the
hw/timer/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs               | 2 +-
 hw/timer/Makefile.objs      | 2 ++
 hw/timer/aspeed_timer.c     | 2 +-
 hw/timer/grlib_gptimer.c    | 2 +-
 hw/timer/lm32_timer.c       | 2 +-
 hw/timer/milkymist-sysctl.c | 2 +-
 hw/timer/slavio_timer.c     | 2 +-
 7 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 3ae5085..2c35b95 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -137,7 +137,7 @@ trace-events-subdirs += hw/scsi
 trace-events-subdirs += hw/nvram
 trace-events-subdirs += hw/display
 trace-events-subdirs += hw/input
-trace-events-y += hw/timer/trace-events
+trace-events-subdirs += hw/timer
 trace-events-y += hw/dma/trace-events
 trace-events-y += hw/sparc/trace-events
 trace-events-y += hw/sd/trace-events
diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs
index 7ba8c23..e764fc1 100644
--- a/hw/timer/Makefile.objs
+++ b/hw/timer/Makefile.objs
@@ -34,3 +34,5 @@ obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
 
 common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o
 common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c
index 9b70ee0..081e160 100644
--- a/hw/timer/aspeed_timer.c
+++ b/hw/timer/aspeed_timer.c
@@ -16,7 +16,7 @@
 #include "qemu/bitops.h"
 #include "qemu/timer.h"
 #include "qemu/log.h"
-#include "trace.h"
+#include "hw/timer/trace.h"
 
 #define TIMER_NR_REGS 4
 
diff --git a/hw/timer/grlib_gptimer.c b/hw/timer/grlib_gptimer.c
index 4ed96e9..fbd81d4 100644
--- a/hw/timer/grlib_gptimer.c
+++ b/hw/timer/grlib_gptimer.c
@@ -28,7 +28,7 @@
 #include "hw/ptimer.h"
 #include "qemu/main-loop.h"
 
-#include "trace.h"
+#include "hw/timer/trace.h"
 
 #define UNIT_REG_SIZE    16     /* Size of memory mapped regs for the unit */
 #define GPTIMER_REG_SIZE 16     /* Size of memory mapped regs for a GPTimer */
diff --git a/hw/timer/lm32_timer.c b/hw/timer/lm32_timer.c
index 2a07b59..003c68c 100644
--- a/hw/timer/lm32_timer.c
+++ b/hw/timer/lm32_timer.c
@@ -24,7 +24,7 @@
 #include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/timer/trace.h"
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
 #include "qemu/error-report.h"
diff --git a/hw/timer/milkymist-sysctl.c b/hw/timer/milkymist-sysctl.c
index 4488590..635b179 100644
--- a/hw/timer/milkymist-sysctl.c
+++ b/hw/timer/milkymist-sysctl.c
@@ -25,7 +25,7 @@
 #include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "sysemu/sysemu.h"
-#include "trace.h"
+#include "hw/timer/trace.h"
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
 #include "qemu/error-report.h"
diff --git a/hw/timer/slavio_timer.c b/hw/timer/slavio_timer.c
index bfee1f3..d9ac437 100644
--- a/hw/timer/slavio_timer.c
+++ b/hw/timer/slavio_timer.c
@@ -27,7 +27,7 @@
 #include "qemu/timer.h"
 #include "hw/ptimer.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/timer/trace.h"
 #include "qemu/main-loop.h"
 
 /*
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 20/47] trace: switch hw/dma/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (18 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 19/47] trace: switch hw/timer/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 21/47] trace: switch hw/sparc/ " Daniel P. Berrange
                   ` (28 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/dma/ directory to include the
hw/dma/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs        | 2 +-
 hw/dma/Makefile.objs | 2 ++
 hw/dma/i8257.c       | 2 +-
 hw/dma/rc4030.c      | 2 +-
 hw/dma/sparc32_dma.c | 2 +-
 hw/dma/sun4m_iommu.c | 2 +-
 6 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 2c35b95..2d56890 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -138,7 +138,7 @@ trace-events-subdirs += hw/nvram
 trace-events-subdirs += hw/display
 trace-events-subdirs += hw/input
 trace-events-subdirs += hw/timer
-trace-events-y += hw/dma/trace-events
+trace-events-subdirs += hw/dma
 trace-events-y += hw/sparc/trace-events
 trace-events-y += hw/sd/trace-events
 trace-events-y += hw/isa/trace-events
diff --git a/hw/dma/Makefile.objs b/hw/dma/Makefile.objs
index 087c8e6..c3f6aae 100644
--- a/hw/dma/Makefile.objs
+++ b/hw/dma/Makefile.objs
@@ -14,3 +14,5 @@ obj-$(CONFIG_XLNX_ZYNQMP) += xlnx_dpdma.o
 obj-$(CONFIG_OMAP) += omap_dma.o soc_dma.o
 obj-$(CONFIG_PXA2XX) += pxa2xx_dma.o
 obj-$(CONFIG_RASPI) += bcm2835_dma.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c
index 8bd82e8..cfc58aa 100644
--- a/hw/dma/i8257.c
+++ b/hw/dma/i8257.c
@@ -26,7 +26,7 @@
 #include "hw/isa/isa.h"
 #include "hw/isa/i8257.h"
 #include "qemu/main-loop.h"
-#include "trace.h"
+#include "hw/dma/trace.h"
 
 #define I8257(obj) \
     OBJECT_CHECK(I8257State, (obj), TYPE_I8257)
diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c
index 17c8518..d4ec853 100644
--- a/hw/dma/rc4030.c
+++ b/hw/dma/rc4030.c
@@ -29,7 +29,7 @@
 #include "qemu/timer.h"
 #include "qemu/log.h"
 #include "exec/address-spaces.h"
-#include "trace.h"
+#include "hw/dma/trace.h"
 
 /********************************************************/
 /* rc4030 emulation                                     */
diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32_dma.c
index 9d545e4..fc2cc94 100644
--- a/hw/dma/sparc32_dma.c
+++ b/hw/dma/sparc32_dma.c
@@ -30,7 +30,7 @@
 #include "hw/sparc/sparc32_dma.h"
 #include "hw/sparc/sun4m.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/dma/trace.h"
 
 /*
  * This is the DMA controller part of chip STP2000 (Master I/O), also
diff --git a/hw/dma/sun4m_iommu.c b/hw/dma/sun4m_iommu.c
index b3cbc54..b7bd15e 100644
--- a/hw/dma/sun4m_iommu.c
+++ b/hw/dma/sun4m_iommu.c
@@ -26,7 +26,7 @@
 #include "hw/sparc/sun4m.h"
 #include "hw/sysbus.h"
 #include "exec/address-spaces.h"
-#include "trace.h"
+#include "hw/dma/trace.h"
 
 /*
  * I/O MMU used by Sun4m systems
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 21/47] trace: switch hw/sparc/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (19 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 20/47] trace: switch hw/dma/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 22/47] trace: switch hw/sd/ " Daniel P. Berrange
                   ` (27 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/sparc/ directory to include the
hw/sparc/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs          | 2 +-
 hw/sparc/Makefile.objs | 2 ++
 hw/sparc/leon3.c       | 2 +-
 hw/sparc/sun4m.c       | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 2d56890..6c7252f 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -139,7 +139,7 @@ trace-events-subdirs += hw/display
 trace-events-subdirs += hw/input
 trace-events-subdirs += hw/timer
 trace-events-subdirs += hw/dma
-trace-events-y += hw/sparc/trace-events
+trace-events-subdirs += hw/sparc
 trace-events-y += hw/sd/trace-events
 trace-events-y += hw/isa/trace-events
 trace-events-y += hw/mem/trace-events
diff --git a/hw/sparc/Makefile.objs b/hw/sparc/Makefile.objs
index c987b5b..f509dc7 100644
--- a/hw/sparc/Makefile.objs
+++ b/hw/sparc/Makefile.objs
@@ -1 +1,3 @@
 obj-y += sun4m.o leon3.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index 6e16478..2cc29d4 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -34,7 +34,7 @@
 #include "hw/boards.h"
 #include "hw/loader.h"
 #include "elf.h"
-#include "trace.h"
+#include "hw/sparc/trace.h"
 #include "exec/address-spaces.h"
 
 #include "hw/sparc/grlib.h"
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index f5b6efd..5b0c31e 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -46,7 +46,7 @@
 #include "hw/loader.h"
 #include "elf.h"
 #include "sysemu/block-backend.h"
-#include "trace.h"
+#include "hw/sparc/trace.h"
 #include "qemu/cutils.h"
 
 /*
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 22/47] trace: switch hw/sd/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (20 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 21/47] trace: switch hw/sparc/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 23/47] trace: switch hw/isa/ " Daniel P. Berrange
                   ` (26 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/sd/ directory to include the
hw/sd/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs             | 2 +-
 hw/sd/Makefile.objs       | 2 ++
 hw/sd/milkymist-memcard.c | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 6c7252f..1d9cdd0 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -140,7 +140,7 @@ trace-events-subdirs += hw/input
 trace-events-subdirs += hw/timer
 trace-events-subdirs += hw/dma
 trace-events-subdirs += hw/sparc
-trace-events-y += hw/sd/trace-events
+trace-events-subdirs += hw/sd
 trace-events-y += hw/isa/trace-events
 trace-events-y += hw/mem/trace-events
 trace-events-y += hw/i386/trace-events
diff --git a/hw/sd/Makefile.objs b/hw/sd/Makefile.objs
index 31c8330..9fe778a 100644
--- a/hw/sd/Makefile.objs
+++ b/hw/sd/Makefile.objs
@@ -6,3 +6,5 @@ common-obj-$(CONFIG_SDHCI) += sdhci.o
 obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o
 obj-$(CONFIG_OMAP) += omap_mmc.o
 obj-$(CONFIG_PXA2XX) += pxa2xx_mmci.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
index 1f2f0ed..ce93fc2 100644
--- a/hw/sd/milkymist-memcard.c
+++ b/hw/sd/milkymist-memcard.c
@@ -25,7 +25,7 @@
 #include "hw/hw.h"
 #include "hw/sysbus.h"
 #include "sysemu/sysemu.h"
-#include "trace.h"
+#include "hw/sd/trace.h"
 #include "qemu/error-report.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 23/47] trace: switch hw/isa/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (21 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 22/47] trace: switch hw/sd/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 24/47] trace: switch hw/mem/ " Daniel P. Berrange
                   ` (25 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/isa/ directory to include the
hw/isa/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs        | 2 +-
 hw/isa/Makefile.objs | 2 ++
 hw/isa/pc87312.c     | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 1d9cdd0..a901f5d 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -141,7 +141,7 @@ trace-events-subdirs += hw/timer
 trace-events-subdirs += hw/dma
 trace-events-subdirs += hw/sparc
 trace-events-subdirs += hw/sd
-trace-events-y += hw/isa/trace-events
+trace-events-subdirs += hw/isa
 trace-events-y += hw/mem/trace-events
 trace-events-y += hw/i386/trace-events
 trace-events-y += hw/9pfs/trace-events
diff --git a/hw/isa/Makefile.objs b/hw/isa/Makefile.objs
index 9164556..a273afd 100644
--- a/hw/isa/Makefile.objs
+++ b/hw/isa/Makefile.objs
@@ -6,3 +6,5 @@ common-obj-$(CONFIG_PIIX4) += piix4.o
 common-obj-$(CONFIG_VT82C686) += vt82c686.o
 
 obj-$(CONFIG_LPC_ICH9) += lpc_ich9.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
index b1c1a0a..d1d13f3 100644
--- a/hw/isa/pc87312.c
+++ b/hw/isa/pc87312.c
@@ -31,7 +31,7 @@
 #include "sysemu/blockdev.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/char.h"
-#include "trace.h"
+#include "hw/isa/trace.h"
 
 
 #define REG_FER 0
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 24/47] trace: switch hw/mem/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (22 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 23/47] trace: switch hw/isa/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 25/47] trace: switch hw/i386/ " Daniel P. Berrange
                   ` (24 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/mem/ directory to include the
hw/mem/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs        | 2 +-
 hw/mem/Makefile.objs | 3 +++
 hw/mem/pc-dimm.c     | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index a901f5d..89953e5 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -142,7 +142,7 @@ trace-events-subdirs += hw/dma
 trace-events-subdirs += hw/sparc
 trace-events-subdirs += hw/sd
 trace-events-subdirs += hw/isa
-trace-events-y += hw/mem/trace-events
+trace-events-subdirs += hw/mem
 trace-events-y += hw/i386/trace-events
 trace-events-y += hw/9pfs/trace-events
 trace-events-y += hw/ppc/trace-events
diff --git a/hw/mem/Makefile.objs b/hw/mem/Makefile.objs
index f12f8b9..ae1f513 100644
--- a/hw/mem/Makefile.objs
+++ b/hw/mem/Makefile.objs
@@ -1,2 +1,5 @@
 common-obj-$(CONFIG_MEM_HOTPLUG) += pc-dimm.o
 common-obj-$(CONFIG_NVDIMM) += nvdimm.o
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 9e8dab0..bcbaa32 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -26,7 +26,7 @@
 #include "qemu/range.h"
 #include "sysemu/numa.h"
 #include "sysemu/kvm.h"
-#include "trace.h"
+#include "hw/mem/trace.h"
 #include "hw/virtio/vhost.h"
 
 typedef struct pc_dimms_capacity {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 25/47] trace: switch hw/i386/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (23 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 24/47] trace: switch hw/mem/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 26/47] trace: switch hw/9pfs/ " Daniel P. Berrange
                   ` (23 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/i386/ directory to include the
hw/i386/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs              | 2 +-
 hw/i386/Makefile.objs      | 2 ++
 hw/i386/x86-iommu.c        | 2 +-
 hw/i386/xen/xen_platform.c | 1 +
 hw/i386/xen/xen_pvdevice.c | 1 +
 5 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 89953e5..14ae798 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -143,7 +143,7 @@ trace-events-subdirs += hw/sparc
 trace-events-subdirs += hw/sd
 trace-events-subdirs += hw/isa
 trace-events-subdirs += hw/mem
-trace-events-y += hw/i386/trace-events
+trace-events-subdirs += hw/i386
 trace-events-y += hw/9pfs/trace-events
 trace-events-y += hw/ppc/trace-events
 trace-events-y += hw/pci/trace-events
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
index 909ead6..f98d3c0 100644
--- a/hw/i386/Makefile.objs
+++ b/hw/i386/Makefile.objs
@@ -9,3 +9,5 @@ obj-$(CONFIG_XEN) += ../xenpv/ xen/
 obj-y += kvmvapic.o
 obj-y += acpi-build.o
 obj-y += pci-assign-load-rom.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
index 2278af7..e2ed227 100644
--- a/hw/i386/x86-iommu.c
+++ b/hw/i386/x86-iommu.c
@@ -22,7 +22,7 @@
 #include "hw/boards.h"
 #include "hw/i386/x86-iommu.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "hw/i386/trace.h"
 
 void x86_iommu_iec_register_notifier(X86IOMMUState *iommu,
                                      iec_notify_fn fn, void *data)
diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
index 2e1e543..2ad1843 100644
--- a/hw/i386/xen/xen_platform.c
+++ b/hw/i386/xen/xen_platform.c
@@ -33,6 +33,7 @@
 #include "hw/xen/xen_common.h"
 #include "hw/xen/xen_backend.h"
 #include "trace.h"
+#include "hw/i386/trace.h"
 #include "exec/address-spaces.h"
 #include "sysemu/block-backend.h"
 #include "qemu/error-report.h"
diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
index c093b34..742a3d9 100644
--- a/hw/i386/xen/xen_pvdevice.c
+++ b/hw/i386/xen/xen_pvdevice.c
@@ -34,6 +34,7 @@
 #include "hw/hw.h"
 #include "hw/pci/pci.h"
 #include "trace.h"
+#include "hw/i386/trace.h"
 
 #define TYPE_XEN_PV_DEVICE  "xen-pvdevice"
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 26/47] trace: switch hw/9pfs/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (24 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 25/47] trace: switch hw/i386/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 27/47] trace: switch hw/ppc/ " Daniel P. Berrange
                   ` (22 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/9pfs/ directory to include the
hw/9pfs/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs         | 2 +-
 hw/9pfs/9p.c          | 2 +-
 hw/9pfs/Makefile.objs | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 14ae798..83906e5 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -144,7 +144,7 @@ trace-events-subdirs += hw/sd
 trace-events-subdirs += hw/isa
 trace-events-subdirs += hw/mem
 trace-events-subdirs += hw/i386
-trace-events-y += hw/9pfs/trace-events
+trace-events-subdirs += hw/9pfs
 trace-events-y += hw/ppc/trace-events
 trace-events-y += hw/pci/trace-events
 trace-events-y += hw/s390x/trace-events
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index fa58877..bb9428c 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -22,7 +22,7 @@
 #include "fsdev/qemu-fsdev.h"
 #include "9p-xattr.h"
 #include "coth.h"
-#include "trace.h"
+#include "hw/9pfs/trace.h"
 #include "migration/migration.h"
 
 int open_fd_hw;
diff --git a/hw/9pfs/Makefile.objs b/hw/9pfs/Makefile.objs
index da0ae0c..28eb2e5 100644
--- a/hw/9pfs/Makefile.objs
+++ b/hw/9pfs/Makefile.objs
@@ -7,3 +7,5 @@ common-obj-$(CONFIG_OPEN_BY_HANDLE) +=  9p-handle.o
 common-obj-y += 9p-proxy.o
 
 obj-y += virtio-9p-device.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 27/47] trace: switch hw/ppc/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (25 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 26/47] trace: switch hw/9pfs/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 28/47] trace: switch hw/pci/ " Daniel P. Berrange
                   ` (21 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/ppc/ directory to include the
hw/ppc/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs           | 2 +-
 hw/ppc/Makefile.objs    | 3 +++
 hw/ppc/ppc.c            | 2 +-
 hw/ppc/prep.c           | 2 +-
 hw/ppc/spapr.c          | 2 +-
 hw/ppc/spapr_hcall.c    | 2 +-
 hw/ppc/spapr_iommu.c    | 2 +-
 hw/ppc/spapr_pci.c      | 2 +-
 hw/ppc/spapr_rtas_ddw.c | 2 +-
 9 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 83906e5..42cd94e 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -145,7 +145,7 @@ trace-events-subdirs += hw/isa
 trace-events-subdirs += hw/mem
 trace-events-subdirs += hw/i386
 trace-events-subdirs += hw/9pfs
-trace-events-y += hw/ppc/trace-events
+trace-events-subdirs += hw/ppc
 trace-events-y += hw/pci/trace-events
 trace-events-y += hw/s390x/trace-events
 trace-events-y += hw/vfio/trace-events
diff --git a/hw/ppc/Makefile.objs b/hw/ppc/Makefile.objs
index 8025129..071428c 100644
--- a/hw/ppc/Makefile.objs
+++ b/hw/ppc/Makefile.objs
@@ -25,3 +25,6 @@ obj-$(CONFIG_E500) += e500.o mpc8544ds.o e500plat.o
 obj-$(CONFIG_E500) += mpc8544_guts.o ppce500_spin.o
 # PowerPC 440 Xilinx ML507 reference board.
 obj-$(CONFIG_XILINX) += virtex_ml507.o
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index 8945869..53302e8 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -37,7 +37,7 @@
 #include "hw/loader.h"
 #include "sysemu/kvm.h"
 #include "kvm_ppc.h"
-#include "trace.h"
+#include "hw/ppc/trace.h"
 
 //#define PPC_DEBUG_IRQ
 //#define PPC_DEBUG_TB
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 054af1e..c5c97b1 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -45,7 +45,7 @@
 #include "sysemu/arch_init.h"
 #include "sysemu/qtest.h"
 #include "exec/address-spaces.h"
-#include "trace.h"
+#include "hw/ppc/trace.h"
 #include "elf.h"
 #include "qemu/cutils.h"
 
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 208ef7b..ebdcf6f 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -61,7 +61,7 @@
 #include "hw/usb.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "hw/ppc/trace.h"
 #include "hw/nmi.h"
 
 #include "hw/compat.h"
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 9a9bedf..332a49a 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -8,7 +8,7 @@
 #include "hw/ppc/spapr.h"
 #include "mmu-hash64.h"
 #include "cpu-models.h"
-#include "trace.h"
+#include "hw/ppc/trace.h"
 #include "sysemu/kvm.h"
 #include "kvm_ppc.h"
 #include "hw/ppc/spapr_ovec.h"
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index ae30bbe..125682d 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -25,7 +25,7 @@
 #include "kvm_ppc.h"
 #include "sysemu/dma.h"
 #include "exec/address-spaces.h"
-#include "trace.h"
+#include "hw/ppc/trace.h"
 
 #include "hw/ppc/spapr.h"
 #include "hw/ppc/spapr_vio.h"
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index fd6fc1d..1acb5b4 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -37,7 +37,7 @@
 #include "exec/address-spaces.h"
 #include "exec/ram_addr.h"
 #include <libfdt.h>
-#include "trace.h"
+#include "hw/ppc/trace.h"
 #include "qemu/error-report.h"
 #include "qapi/qmp/qerror.h"
 
diff --git a/hw/ppc/spapr_rtas_ddw.c b/hw/ppc/spapr_rtas_ddw.c
index 177dcff..3dad98c 100644
--- a/hw/ppc/spapr_rtas_ddw.c
+++ b/hw/ppc/spapr_rtas_ddw.c
@@ -22,7 +22,7 @@
 #include "qemu/error-report.h"
 #include "hw/ppc/spapr.h"
 #include "hw/pci-host/spapr.h"
-#include "trace.h"
+#include "hw/ppc/trace.h"
 
 static int spapr_phb_get_active_win_num_cb(Object *child, void *opaque)
 {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 28/47] trace: switch hw/pci/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (26 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 27/47] trace: switch hw/ppc/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 29/47] trace: switch hw/s390x/ " Daniel P. Berrange
                   ` (20 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/pci/ directory to include the
hw/pci/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs        | 2 +-
 hw/pci/Makefile.objs | 2 ++
 hw/pci/pci.c         | 2 +-
 hw/pci/pci_host.c    | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 42cd94e..66ffeca 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -146,7 +146,7 @@ trace-events-subdirs += hw/mem
 trace-events-subdirs += hw/i386
 trace-events-subdirs += hw/9pfs
 trace-events-subdirs += hw/ppc
-trace-events-y += hw/pci/trace-events
+trace-events-subdirs += hw/pci
 trace-events-y += hw/s390x/trace-events
 trace-events-y += hw/vfio/trace-events
 trace-events-y += hw/acpi/trace-events
diff --git a/hw/pci/Makefile.objs b/hw/pci/Makefile.objs
index 9f905e6..b075774 100644
--- a/hw/pci/Makefile.objs
+++ b/hw/pci/Makefile.objs
@@ -7,3 +7,5 @@ common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
 
 common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
 common-obj-$(CONFIG_ALL) += pci-stub.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 24fae16..8c1c7b9 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -34,7 +34,7 @@
 #include "qemu/error-report.h"
 #include "qemu/range.h"
 #include "qmp-commands.h"
-#include "trace.h"
+#include "hw/pci/trace.h"
 #include "hw/pci/msi.h"
 #include "hw/pci/msix.h"
 #include "exec/address-spaces.h"
diff --git a/hw/pci/pci_host.c b/hw/pci/pci_host.c
index 5eaa935..2ecf5b9 100644
--- a/hw/pci/pci_host.c
+++ b/hw/pci/pci_host.c
@@ -22,7 +22,7 @@
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_host.h"
 #include "hw/pci/pci_bus.h"
-#include "trace.h"
+#include "hw/pci/trace.h"
 
 /* debug PCI */
 //#define DEBUG_PCI
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 29/47] trace: switch hw/s390x/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (27 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 28/47] trace: switch hw/pci/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 30/47] trace: switch hw/vfio/ " Daniel P. Berrange
                   ` (19 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/s390x/ directory to include the
hw/s390x/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs          | 2 +-
 hw/s390x/Makefile.objs | 3 +++
 hw/s390x/css.c         | 2 +-
 hw/s390x/virtio-ccw.c  | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 66ffeca..8f44164 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -147,7 +147,7 @@ trace-events-subdirs += hw/i386
 trace-events-subdirs += hw/9pfs
 trace-events-subdirs += hw/ppc
 trace-events-subdirs += hw/pci
-trace-events-y += hw/s390x/trace-events
+trace-events-subdirs += hw/s390x
 trace-events-y += hw/vfio/trace-events
 trace-events-y += hw/acpi/trace-events
 trace-events-y += hw/arm/trace-events
diff --git a/hw/s390x/Makefile.objs b/hw/s390x/Makefile.objs
index 41ac4ec..ac66483 100644
--- a/hw/s390x/Makefile.objs
+++ b/hw/s390x/Makefile.objs
@@ -13,3 +13,6 @@ obj-y += ccw-device.o
 obj-y += s390-pci-bus.o s390-pci-inst.o
 obj-y += s390-skeys.o
 obj-$(CONFIG_KVM) += s390-skeys-kvm.o
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 0f2580d..e11ffa3 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -18,7 +18,7 @@
 #include "cpu.h"
 #include "hw/s390x/ioinst.h"
 #include "hw/s390x/css.h"
-#include "trace.h"
+#include "hw/s390x/trace.h"
 #include "hw/s390x/s390_flic.h"
 
 typedef struct CrwContainer {
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index f5c1d98..7b8c7fc 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -32,7 +32,7 @@
 #include "hw/s390x/ioinst.h"
 #include "hw/s390x/css.h"
 #include "virtio-ccw.h"
-#include "trace.h"
+#include "hw/s390x/trace.h"
 #include "hw/s390x/css-bridge.h"
 
 static void virtio_ccw_bus_new(VirtioBusState *bus, size_t bus_size,
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 30/47] trace: switch hw/vfio/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (28 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 29/47] trace: switch hw/s390x/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 31/47] trace: switch hw/acpi/ " Daniel P. Berrange
                   ` (18 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/vfio/ directory to include the
hw/vfio/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs         | 2 +-
 hw/vfio/Makefile.objs | 2 ++
 hw/vfio/common.c      | 2 +-
 hw/vfio/pci-quirks.c  | 2 +-
 hw/vfio/pci.c         | 2 +-
 hw/vfio/platform.c    | 2 +-
 hw/vfio/spapr.c       | 2 +-
 7 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 8f44164..cea70ce 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -148,7 +148,7 @@ trace-events-subdirs += hw/9pfs
 trace-events-subdirs += hw/ppc
 trace-events-subdirs += hw/pci
 trace-events-subdirs += hw/s390x
-trace-events-y += hw/vfio/trace-events
+trace-events-subdirs += hw/vfio
 trace-events-y += hw/acpi/trace-events
 trace-events-y += hw/arm/trace-events
 trace-events-y += hw/alpha/trace-events
diff --git a/hw/vfio/Makefile.objs b/hw/vfio/Makefile.objs
index c25e32b..33f7d4f 100644
--- a/hw/vfio/Makefile.objs
+++ b/hw/vfio/Makefile.objs
@@ -5,4 +5,6 @@ obj-$(CONFIG_SOFTMMU) += platform.o
 obj-$(CONFIG_SOFTMMU) += calxeda-xgmac.o
 obj-$(CONFIG_SOFTMMU) += amd-xgbe.o
 obj-$(CONFIG_SOFTMMU) += spapr.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
 endif
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 801578b..0e28500 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -33,7 +33,7 @@
 #include "qemu/error-report.h"
 #include "qemu/range.h"
 #include "sysemu/kvm.h"
-#include "trace.h"
+#include "hw/vfio/trace.h"
 #include "qapi/error.h"
 
 struct vfio_group_head vfio_group_list =
diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
index 811eecd..b470ba2 100644
--- a/hw/vfio/pci-quirks.c
+++ b/hw/vfio/pci-quirks.c
@@ -16,7 +16,7 @@
 #include "qapi/error.h"
 #include "hw/nvram/fw_cfg.h"
 #include "pci.h"
-#include "trace.h"
+#include "hw/vfio/trace.h"
 
 /* Use uin32_t for vendor & device so PCI_ANY_ID expands and cannot match hw */
 static bool vfio_pci_is(VFIOPCIDevice *vdev, uint32_t vendor, uint32_t device)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index d7dbe0e..e2d3e7b 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -30,7 +30,7 @@
 #include "sysemu/kvm.h"
 #include "sysemu/sysemu.h"
 #include "pci.h"
-#include "trace.h"
+#include "hw/vfio/trace.h"
 #include "qapi/error.h"
 
 #define MSIX_CAP_LENGTH 12
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index a4663c9..ab9f19d 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -26,7 +26,7 @@
 #include "exec/memory.h"
 #include "qemu/queue.h"
 #include "hw/sysbus.h"
-#include "trace.h"
+#include "hw/vfio/trace.h"
 #include "hw/platform-bus.h"
 #include "sysemu/kvm.h"
 
diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c
index 4409bcc..5899f6d 100644
--- a/hw/vfio/spapr.c
+++ b/hw/vfio/spapr.c
@@ -16,7 +16,7 @@
 #include "hw/vfio/vfio-common.h"
 #include "hw/hw.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "hw/vfio/trace.h"
 
 static bool vfio_prereg_listener_skipped_section(MemoryRegionSection *section)
 {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 31/47] trace: switch hw/acpi/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (29 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 30/47] trace: switch hw/vfio/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 32/47] trace: switch hw/arm/ " Daniel P. Berrange
                   ` (17 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/acpi/ directory to include the
hw/acpi/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs            | 2 +-
 hw/acpi/Makefile.objs    | 2 ++
 hw/acpi/cpu.c            | 2 +-
 hw/acpi/memory_hotplug.c | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index cea70ce..86c62cd 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -149,7 +149,7 @@ trace-events-subdirs += hw/ppc
 trace-events-subdirs += hw/pci
 trace-events-subdirs += hw/s390x
 trace-events-subdirs += hw/vfio
-trace-events-y += hw/acpi/trace-events
+trace-events-subdirs += hw/acpi
 trace-events-y += hw/arm/trace-events
 trace-events-y += hw/alpha/trace-events
 trace-events-y += ui/trace-events
diff --git a/hw/acpi/Makefile.objs b/hw/acpi/Makefile.objs
index 489e63b..abdc809 100644
--- a/hw/acpi/Makefile.objs
+++ b/hw/acpi/Makefile.objs
@@ -8,3 +8,5 @@ common-obj-$(CONFIG_ACPI) += acpi_interface.o
 common-obj-$(CONFIG_ACPI) += bios-linker-loader.o
 common-obj-$(CONFIG_ACPI) += aml-build.o
 common-obj-$(call land,$(CONFIG_ACPI),$(CONFIG_IPMI)) += ipmi.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c
index 5ac89fe..68e1c0f 100644
--- a/hw/acpi/cpu.c
+++ b/hw/acpi/cpu.c
@@ -3,7 +3,7 @@
 #include "hw/acpi/cpu.h"
 #include "qapi/error.h"
 #include "qapi-event.h"
-#include "trace.h"
+#include "hw/acpi/trace.h"
 #include "sysemu/numa.h"
 
 #define ACPI_CPU_HOTPLUG_REG_LEN 12
diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c
index ec4e64b..e442970 100644
--- a/hw/acpi/memory_hotplug.c
+++ b/hw/acpi/memory_hotplug.c
@@ -4,7 +4,7 @@
 #include "hw/mem/pc-dimm.h"
 #include "hw/boards.h"
 #include "hw/qdev-core.h"
-#include "trace.h"
+#include "hw/acpi/trace.h"
 #include "qapi-event.h"
 
 static ACPIOSTInfo *acpi_memory_device_status(int slot, MemStatus *mdev)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 32/47] trace: switch hw/arm/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (30 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 31/47] trace: switch hw/acpi/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 33/47] trace: switch hw/alpha/ " Daniel P. Berrange
                   ` (16 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/arm/ directory to include the
hw/arm/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs            | 2 +-
 hw/arm/Makefile.objs     | 2 ++
 hw/arm/virt-acpi-build.c | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 86c62cd..6a0c033 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -150,7 +150,7 @@ trace-events-subdirs += hw/pci
 trace-events-subdirs += hw/s390x
 trace-events-subdirs += hw/vfio
 trace-events-subdirs += hw/acpi
-trace-events-y += hw/arm/trace-events
+trace-events-subdirs += hw/arm
 trace-events-y += hw/alpha/trace-events
 trace-events-y += ui/trace-events
 trace-events-y += audio/trace-events
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index 4c5c4ee..0704312 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -18,3 +18,5 @@ obj-$(CONFIG_FSL_IMX25) += fsl-imx25.o imx25_pdk.o
 obj-$(CONFIG_FSL_IMX31) += fsl-imx31.o kzm.o
 obj-$(CONFIG_FSL_IMX6) += fsl-imx6.o sabrelite.o
 obj-$(CONFIG_ASPEED_SOC) += aspeed_soc.o aspeed.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 7102686..915f88d 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -31,7 +31,7 @@
 #include "qemu-common.h"
 #include "hw/arm/virt-acpi-build.h"
 #include "qemu/bitmap.h"
-#include "trace.h"
+#include "hw/arm/trace.h"
 #include "qom/cpu.h"
 #include "target/arm/cpu.h"
 #include "hw/acpi/acpi-defs.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 33/47] trace: switch hw/alpha/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (31 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 32/47] trace: switch hw/arm/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 34/47] trace: switch ui/ " Daniel P. Berrange
                   ` (15 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the hw/alpha/ directory to include the
hw/alpha/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs          | 2 +-
 hw/alpha/Makefile.objs | 2 ++
 hw/alpha/pci.c         | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 6a0c033..3a4abc7 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -151,7 +151,7 @@ trace-events-subdirs += hw/s390x
 trace-events-subdirs += hw/vfio
 trace-events-subdirs += hw/acpi
 trace-events-subdirs += hw/arm
-trace-events-y += hw/alpha/trace-events
+trace-events-subdirs += hw/alpha
 trace-events-y += ui/trace-events
 trace-events-y += audio/trace-events
 trace-events-y += net/trace-events
diff --git a/hw/alpha/Makefile.objs b/hw/alpha/Makefile.objs
index 5c74275..e8e0573 100644
--- a/hw/alpha/Makefile.objs
+++ b/hw/alpha/Makefile.objs
@@ -1 +1,3 @@
 obj-y += dp264.o pci.o typhoon.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/hw/alpha/pci.c b/hw/alpha/pci.c
index 8dde637..3fafb1b 100644
--- a/hw/alpha/pci.c
+++ b/hw/alpha/pci.c
@@ -11,7 +11,7 @@
 #include "alpha_sys.h"
 #include "qemu/log.h"
 #include "sysemu/sysemu.h"
-#include "trace.h"
+#include "hw/alpha/trace.h"
 
 
 /* Fallback for unassigned PCI I/O operations.  Avoids MCHK.  */
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 34/47] trace: switch ui/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (32 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 33/47] trace: switch hw/alpha/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 35/47] trace: switch audio/ " Daniel P. Berrange
                   ` (14 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the ui/ directory to include the
ui/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs      | 2 +-
 ui/Makefile.objs   | 3 +++
 ui/console.c       | 2 +-
 ui/gtk-egl.c       | 2 +-
 ui/gtk-gl-area.c   | 2 +-
 ui/gtk.c           | 2 +-
 ui/input.c         | 2 +-
 ui/spice-display.c | 2 +-
 ui/vnc.c           | 2 +-
 9 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 3a4abc7..355cb78 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -152,7 +152,7 @@ trace-events-subdirs += hw/vfio
 trace-events-subdirs += hw/acpi
 trace-events-subdirs += hw/arm
 trace-events-subdirs += hw/alpha
-trace-events-y += ui/trace-events
+trace-events-subdirs += ui
 trace-events-y += audio/trace-events
 trace-events-y += net/trace-events
 trace-events-y += target/arm/trace-events
diff --git a/ui/Makefile.objs b/ui/Makefile.objs
index dc936f1..c9d1847 100644
--- a/ui/Makefile.objs
+++ b/ui/Makefile.objs
@@ -51,3 +51,6 @@ gtk-egl.o-libs += $(OPENGL_LIBS)
 shader.o-libs += $(OPENGL_LIBS)
 console-gl.o-libs += $(OPENGL_LIBS)
 egl-helpers.o-libs += $(OPENGL_LIBS)
+
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/ui/console.c b/ui/console.c
index ed888e5..73b8341 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -28,7 +28,7 @@
 #include "qemu/timer.h"
 #include "qmp-commands.h"
 #include "sysemu/char.h"
-#include "trace.h"
+#include "ui/trace.h"
 #include "exec/memory.h"
 
 #define DEFAULT_BACKSCROLL 512
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index 3f5d328..1c12d34 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -14,7 +14,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 
-#include "trace.h"
+#include "ui/trace.h"
 
 #include "ui/console.h"
 #include "ui/gtk.h"
diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 0df5a36..49c9e00 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -10,7 +10,7 @@
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 
-#include "trace.h"
+#include "ui/trace.h"
 
 #include "ui/console.h"
 #include "ui/gtk.h"
diff --git a/ui/gtk.c b/ui/gtk.c
index a216216..1d71691 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -48,7 +48,7 @@
 #endif
 #include <math.h>
 
-#include "trace.h"
+#include "ui/trace.h"
 #include "ui/input.h"
 #include "sysemu/sysemu.h"
 #include "qmp-commands.h"
diff --git a/ui/input.c b/ui/input.c
index ed88cda..b3b881b 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -4,7 +4,7 @@
 #include "qapi-types.h"
 #include "qemu/error-report.h"
 #include "qmp-commands.h"
-#include "trace.h"
+#include "ui/trace.h"
 #include "ui/input.h"
 #include "ui/console.h"
 #include "sysemu/replay.h"
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 5e6f78a..d8f13db 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -22,7 +22,7 @@
 #include "qemu/queue.h"
 #include "ui/console.h"
 #include "sysemu/sysemu.h"
-#include "trace.h"
+#include "ui/trace.h"
 
 #include "ui/spice-display.h"
 
diff --git a/ui/vnc.c b/ui/vnc.c
index 2c28a59..f715b48 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -27,7 +27,7 @@
 #include "qemu/osdep.h"
 #include "vnc.h"
 #include "vnc-jobs.h"
-#include "trace.h"
+#include "ui/trace.h"
 #include "hw/qdev.h"
 #include "sysemu/sysemu.h"
 #include "qemu/error-report.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 35/47] trace: switch audio/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (33 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 34/47] trace: switch ui/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 36/47] trace: switch net/ " Daniel P. Berrange
                   ` (13 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the audio/ directory to include the
audio/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs       | 2 +-
 audio/Makefile.objs | 2 ++
 audio/alsaaudio.c   | 2 +-
 audio/ossaudio.c    | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 355cb78..dc3a51e 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -153,7 +153,7 @@ trace-events-subdirs += hw/acpi
 trace-events-subdirs += hw/arm
 trace-events-subdirs += hw/alpha
 trace-events-subdirs += ui
-trace-events-y += audio/trace-events
+trace-events-subdirs += audio
 trace-events-y += net/trace-events
 trace-events-y += target/arm/trace-events
 trace-events-y += target/i386/trace-events
diff --git a/audio/Makefile.objs b/audio/Makefile.objs
index 481d1aa..4eef4b4 100644
--- a/audio/Makefile.objs
+++ b/audio/Makefile.objs
@@ -9,5 +9,7 @@ common-obj-$(CONFIG_PA) += paaudio.o
 common-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
 common-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
 common-obj-y += wavcapture.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
 
 sdlaudio.o-cflags := $(SDL_CFLAGS)
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index 3652a7b..1111b71 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -26,7 +26,7 @@
 #include "qemu-common.h"
 #include "qemu/main-loop.h"
 #include "audio.h"
-#include "trace.h"
+#include "audio/trace.h"
 
 #if QEMU_GNUC_PREREQ(4, 3)
 #pragma GCC diagnostic ignored "-Waddress"
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 0edd7ea..c04da5e 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -28,7 +28,7 @@
 #include "qemu/main-loop.h"
 #include "qemu/host-utils.h"
 #include "audio.h"
-#include "trace.h"
+#include "audio/trace.h"
 
 #define AUDIO_CAP "oss"
 #include "audio_int.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 36/47] trace: switch net/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (34 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 35/47] trace: switch audio/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 37/47] trace: switch target/arm/ " Daniel P. Berrange
                   ` (12 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the net/ directory to include the
net/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs       | 2 +-
 net/Makefile.objs   | 2 ++
 net/filter-mirror.c | 2 +-
 net/vhost-user.c    | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index dc3a51e..d6125a8 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -154,7 +154,7 @@ trace-events-subdirs += hw/arm
 trace-events-subdirs += hw/alpha
 trace-events-subdirs += ui
 trace-events-subdirs += audio
-trace-events-y += net/trace-events
+trace-events-subdirs += net
 trace-events-y += target/arm/trace-events
 trace-events-y += target/i386/trace-events
 trace-events-y += target/sparc/trace-events
diff --git a/net/Makefile.objs b/net/Makefile.objs
index 2e2fd43..9cb8f78 100644
--- a/net/Makefile.objs
+++ b/net/Makefile.objs
@@ -20,3 +20,5 @@ common-obj-y += colo-compare.o
 common-obj-y += colo.o
 common-obj-y += filter-rewriter.o
 common-obj-y += filter-replay.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/net/filter-mirror.c b/net/filter-mirror.c
index b7d6456..5e1cb16 100644
--- a/net/filter-mirror.c
+++ b/net/filter-mirror.c
@@ -19,7 +19,7 @@
 #include "qom/object.h"
 #include "qemu/main-loop.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "net/trace.h"
 #include "sysemu/char.h"
 #include "qemu/iov.h"
 #include "qemu/sockets.h"
diff --git a/net/vhost-user.c b/net/vhost-user.c
index 7aff77e..c812462 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -16,7 +16,7 @@
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
 #include "qmp-commands.h"
-#include "trace.h"
+#include "net/trace.h"
 
 typedef struct VhostUserState {
     NetClientState nc;
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 37/47] trace: switch target/arm/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (35 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 36/47] trace: switch net/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 38/47] trace: switch target/i386/ " Daniel P. Berrange
                   ` (11 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the target/arm/ directory to include the
target/arm/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs            | 2 +-
 target/arm/Makefile.objs | 2 ++
 target/arm/helper.c      | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index d6125a8..dda2c04 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -155,7 +155,7 @@ trace-events-subdirs += hw/alpha
 trace-events-subdirs += ui
 trace-events-subdirs += audio
 trace-events-subdirs += net
-trace-events-y += target/arm/trace-events
+trace-events-subdirs += target/arm
 trace-events-y += target/i386/trace-events
 trace-events-y += target/sparc/trace-events
 trace-events-y += target/s390x/trace-events
diff --git a/target/arm/Makefile.objs b/target/arm/Makefile.objs
index 847fb52..a6bbb0e 100644
--- a/target/arm/Makefile.objs
+++ b/target/arm/Makefile.objs
@@ -10,3 +10,5 @@ obj-y += gdbstub.o
 obj-$(TARGET_AARCH64) += cpu64.o translate-a64.o helper-a64.o gdbstub64.o
 obj-y += crypto_helper.o
 obj-$(CONFIG_SOFTMMU) += arm-powerctl.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 8dcabbf..4b232e9 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -1,5 +1,5 @@
 #include "qemu/osdep.h"
-#include "trace.h"
+#include "target/arm/trace.h"
 #include "cpu.h"
 #include "internals.h"
 #include "exec/gdbstub.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 38/47] trace: switch target/i386/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (36 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 37/47] trace: switch target/arm/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 39/47] trace: switch target/sparc/ " Daniel P. Berrange
                   ` (10 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the target/i386/ directory to include the
target/i386/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs             | 2 +-
 target/i386/Makefile.objs | 2 ++
 target/i386/kvm.c         | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index dda2c04..a1161be 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -156,7 +156,7 @@ trace-events-subdirs += ui
 trace-events-subdirs += audio
 trace-events-subdirs += net
 trace-events-subdirs += target/arm
-trace-events-y += target/i386/trace-events
+trace-events-subdirs += target/i386
 trace-events-y += target/sparc/trace-events
 trace-events-y += target/s390x/trace-events
 trace-events-y += target/ppc/trace-events
diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs
index b223d79..a73e6f3 100644
--- a/target/i386/Makefile.objs
+++ b/target/i386/Makefile.objs
@@ -5,3 +5,5 @@ obj-y += gdbstub.o
 obj-$(CONFIG_SOFTMMU) += machine.o arch_memory_mapping.o arch_dump.o monitor.o
 obj-$(CONFIG_KVM) += kvm.o hyperv.o
 obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 10a9cd8..87f4eae 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -44,7 +44,7 @@
 #include "hw/pci/msi.h"
 #include "migration/migration.h"
 #include "exec/memattrs.h"
-#include "trace.h"
+#include "target/i386/trace.h"
 
 //#define DEBUG_KVM
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 39/47] trace: switch target/sparc/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (37 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 38/47] trace: switch target/i386/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ " Daniel P. Berrange
                   ` (9 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the target/sparc/ directory to include the
target/sparc/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs               | 2 +-
 target/sparc/Makefile.objs  | 2 ++
 target/sparc/int32_helper.c | 2 +-
 target/sparc/int64_helper.c | 2 +-
 target/sparc/mmu_helper.c   | 2 +-
 target/sparc/win_helper.c   | 2 +-
 6 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index a1161be..cc8f506 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -157,7 +157,7 @@ trace-events-subdirs += audio
 trace-events-subdirs += net
 trace-events-subdirs += target/arm
 trace-events-subdirs += target/i386
-trace-events-y += target/sparc/trace-events
+trace-events-subdirs += target/sparc
 trace-events-y += target/s390x/trace-events
 trace-events-y += target/ppc/trace-events
 trace-events-y += qom/trace-events
diff --git a/target/sparc/Makefile.objs b/target/sparc/Makefile.objs
index ec90569..0ca6e73 100644
--- a/target/sparc/Makefile.objs
+++ b/target/sparc/Makefile.objs
@@ -5,3 +5,5 @@ obj-$(TARGET_SPARC) += int32_helper.o
 obj-$(TARGET_SPARC64) += int64_helper.o
 obj-$(TARGET_SPARC64) += vis_helper.o
 obj-y += gdbstub.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/target/sparc/int32_helper.c b/target/sparc/int32_helper.c
index 09afe13..2838eda 100644
--- a/target/sparc/int32_helper.c
+++ b/target/sparc/int32_helper.c
@@ -19,7 +19,7 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "trace.h"
+#include "target/sparc/trace.h"
 #include "sysemu/sysemu.h"
 #include "exec/log.h"
 
diff --git a/target/sparc/int64_helper.c b/target/sparc/int64_helper.c
index 29360fa..ad0a16c 100644
--- a/target/sparc/int64_helper.c
+++ b/target/sparc/int64_helper.c
@@ -21,7 +21,7 @@
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "exec/log.h"
-#include "trace.h"
+#include "target/sparc/trace.h"
 
 #define DEBUG_PCALL
 
diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c
index 044e88c..6f66c4a 100644
--- a/target/sparc/mmu_helper.c
+++ b/target/sparc/mmu_helper.c
@@ -20,7 +20,7 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
-#include "trace.h"
+#include "target/sparc/trace.h"
 #include "exec/address-spaces.h"
 
 /* Sparc MMU emulation */
diff --git a/target/sparc/win_helper.c b/target/sparc/win_helper.c
index 2d5b546..3b6dd33 100644
--- a/target/sparc/win_helper.c
+++ b/target/sparc/win_helper.c
@@ -21,7 +21,7 @@
 #include "cpu.h"
 #include "exec/exec-all.h"
 #include "exec/helper-proto.h"
-#include "trace.h"
+#include "target/sparc/trace.h"
 
 static inline void memcpy32(target_ulong *dst, const target_ulong *src)
 {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (38 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 39/47] trace: switch target/sparc/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 17:09   ` Lluís Vilanova
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 41/47] trace: switch target/ppc/ " Daniel P. Berrange
                   ` (8 subsequent siblings)
  48 siblings, 1 reply; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the target/s390x/ directory to include the
target/s390x/trace.h file instead of the global trace.h
file.

The make rules for gen-features.{h,c} need to be moved
out into the top level Makefile.objs, otherwise make
complains about the rules being defined multiple times
due to target/s390x/Makefile.objs being included
multiple times when expanding different subdir object
lists.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs              |  2 +-
 Makefile.target            | 23 +++++++++++++++++++++++
 target/s390x/Makefile.objs | 21 ++-------------------
 target/s390x/cpu.c         |  2 +-
 target/s390x/ioinst.c      |  2 +-
 target/s390x/kvm.c         |  2 +-
 target/s390x/mmu_helper.c  |  2 +-
 7 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index cc8f506..5d50645 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -158,7 +158,7 @@ trace-events-subdirs += net
 trace-events-subdirs += target/arm
 trace-events-subdirs += target/i386
 trace-events-subdirs += target/sparc
-trace-events-y += target/s390x/trace-events
+trace-events-subdirs += target/s390x
 trace-events-y += target/ppc/trace-events
 trace-events-y += qom/trace-events
 trace-events-y += linux-user/trace-events
diff --git a/Makefile.target b/Makefile.target
index b14ab45..38ef518 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -162,6 +162,29 @@ GENERATED_HEADERS += hmp-commands.h hmp-commands-info.h
 
 endif # CONFIG_SOFTMMU
 
+ifeq ($(TARGET_BASE_ARCH),s390x)
+# build and run feature list generator
+feat-src = $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/
+feat-dst = $(BUILD_DIR)/$(TARGET_DIR)
+ifneq ($(MAKECMDGOALS),clean)
+GENERATED_HEADERS += $(feat-dst)gen-features.h
+endif
+
+$(feat-dst)gen-features.h: $(feat-dst)gen-features.h-timestamp
+	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
+$(feat-dst)gen-features.h-timestamp: $(feat-dst)gen-features
+	$(call quiet-command,$< >$@,"GEN","$(TARGET_DIR)gen-features.h")
+
+$(feat-dst)gen-features: $(feat-src)gen-features.c
+	$(call quiet-command,$(HOST_CC) $(QEMU_INCLUDES) -o $@ $<,"CC","$(TARGET_DIR)gen-features")
+
+clean-target:
+	rm -f gen-features.h-timestamp
+	rm -f gen-features.h
+	rm -f gen-features
+
+endif
+
 # Workaround for http://gcc.gnu.org/PR55489, see configure.
 %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS)
 
diff --git a/target/s390x/Makefile.objs b/target/s390x/Makefile.objs
index c573633..98f6f95 100644
--- a/target/s390x/Makefile.objs
+++ b/target/s390x/Makefile.objs
@@ -4,22 +4,5 @@ obj-y += gdbstub.o cpu_models.o cpu_features.o
 obj-$(CONFIG_SOFTMMU) += machine.o ioinst.o arch_dump.o mmu_helper.o
 obj-$(CONFIG_KVM) += kvm.o
 
-# build and run feature list generator
-feat-src = $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/
-feat-dst = $(BUILD_DIR)/$(TARGET_DIR)
-ifneq ($(MAKECMDGOALS),clean)
-GENERATED_HEADERS += $(feat-dst)gen-features.h
-endif
-
-$(feat-dst)gen-features.h: $(feat-dst)gen-features.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(feat-dst)gen-features.h-timestamp: $(feat-dst)gen-features
-	$(call quiet-command,$< >$@,"GEN","$(TARGET_DIR)gen-features.h")
-
-$(feat-dst)gen-features: $(feat-src)gen-features.c
-	$(call quiet-command,$(HOST_CC) $(QEMU_INCLUDES) -o $@ $<,"CC","$(TARGET_DIR)gen-features")
-
-clean-target:
-	rm -f gen-features.h-timestamp
-	rm -f gen-features.h
-	rm -f gen-features
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 0a39d31..db92ea1 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -30,7 +30,7 @@
 #include "qemu/cutils.h"
 #include "qemu/timer.h"
 #include "qemu/error-report.h"
-#include "trace.h"
+#include "target/s390x/trace.h"
 #include "qapi/visitor.h"
 #include "migration/vmstate.h"
 #include "exec/exec-all.h"
diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c
index 590bfa4..b2ff2fc 100644
--- a/target/s390x/ioinst.c
+++ b/target/s390x/ioinst.c
@@ -13,7 +13,7 @@
 
 #include "cpu.h"
 #include "hw/s390x/ioinst.h"
-#include "trace.h"
+#include "target/s390x/trace.h"
 #include "hw/s390x/s390-pci-bus.h"
 
 int ioinst_disassemble_sch_ident(uint32_t value, int *m, int *cssid, int *ssid,
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 97afe02..c861a58 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -38,7 +38,7 @@
 #include "qapi/qmp/qjson.h"
 #include "exec/gdbstub.h"
 #include "exec/address-spaces.h"
-#include "trace.h"
+#include "target/s390x/trace.h"
 #include "qapi-event.h"
 #include "hw/s390x/s390-pci-inst.h"
 #include "hw/s390x/s390-pci-bus.h"
diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
index b11a027..100f888 100644
--- a/target/s390x/mmu_helper.c
+++ b/target/s390x/mmu_helper.c
@@ -20,7 +20,7 @@
 #include "exec/address-spaces.h"
 #include "cpu.h"
 #include "sysemu/kvm.h"
-#include "trace.h"
+#include "target/s390x/trace.h"
 #include "hw/s390x/storage-keys.h"
 
 /* #define DEBUG_S390 */
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 41/47] trace: switch target/ppc/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (39 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 42/47] trace: switch qom/ " Daniel P. Berrange
                   ` (7 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the target/ppc/ directory to include the
target/ppc/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs            | 2 +-
 target/ppc/Makefile.objs | 2 ++
 target/ppc/kvm.c         | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 5d50645..5dbbf6c 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -159,7 +159,7 @@ trace-events-subdirs += target/arm
 trace-events-subdirs += target/i386
 trace-events-subdirs += target/sparc
 trace-events-subdirs += target/s390x
-trace-events-y += target/ppc/trace-events
+trace-events-subdirs += target/ppc
 trace-events-y += qom/trace-events
 trace-events-y += linux-user/trace-events
 trace-events-y += qapi/trace-events
diff --git a/target/ppc/Makefile.objs b/target/ppc/Makefile.objs
index e667e69..7a71b38 100644
--- a/target/ppc/Makefile.objs
+++ b/target/ppc/Makefile.objs
@@ -15,3 +15,5 @@ obj-y += misc_helper.o
 obj-y += mem_helper.o
 obj-$(CONFIG_USER_ONLY) += user_only_helper.o
 obj-y += gdbstub.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 9c4834c..497c5a6 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -39,7 +39,7 @@
 #include "hw/ppc/spapr_cpu_core.h"
 #include "hw/ppc/ppc.h"
 #include "sysemu/watchdog.h"
-#include "trace.h"
+#include "target/ppc/trace.h"
 #include "exec/gdbstub.h"
 #include "exec/memattrs.h"
 #include "sysemu/hostmem.h"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 42/47] trace: switch qom/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (40 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 41/47] trace: switch target/ppc/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 43/47] trace: switch linux-user/ " Daniel P. Berrange
                   ` (6 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the qom/ directory to include the
qom/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs     | 2 +-
 qom/Makefile.objs | 2 ++
 qom/object.c      | 2 +-
 qom/trace-events  | 7 +++++++
 trace-events      | 6 ------
 5 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 5dbbf6c..cfef83b 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -160,7 +160,7 @@ trace-events-subdirs += target/i386
 trace-events-subdirs += target/sparc
 trace-events-subdirs += target/s390x
 trace-events-subdirs += target/ppc
-trace-events-y += qom/trace-events
+trace-events-subdirs += qom
 trace-events-y += linux-user/trace-events
 trace-events-y += qapi/trace-events
 
diff --git a/qom/Makefile.objs b/qom/Makefile.objs
index 516349e..8cc7800 100644
--- a/qom/Makefile.objs
+++ b/qom/Makefile.objs
@@ -1,4 +1,6 @@
 qom-obj-y = object.o container.o qom-qobject.o
 qom-obj-y += object_interfaces.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
 
 common-obj-y = cpu.o
diff --git a/qom/object.c b/qom/object.c
index 7a05e35..4e50fdd 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -20,7 +20,7 @@
 #include "qapi/string-input-visitor.h"
 #include "qapi/string-output-visitor.h"
 #include "qapi/qmp/qerror.h"
-#include "trace.h"
+#include "qom/trace.h"
 
 /* TODO: replace QObject with a simpler visitor to avoid a dependency
  * of the QOM core on QObject?  */
diff --git a/qom/trace-events b/qom/trace-events
index 97db357..37c43be 100644
--- a/qom/trace-events
+++ b/qom/trace-events
@@ -3,3 +3,10 @@
 # qom/object.c
 object_dynamic_cast_assert(const char *type, const char *target, const char *file, int line, const char *func) "%s->%s (%s:%d:%s)"
 object_class_dynamic_cast_assert(const char *type, const char *target, const char *file, int line, const char *func) "%s->%s (%s:%d:%s)"
+
+# qom/cpu.c
+# Reset the state of a virtual (guest) CPU
+#
+# Mode: user, softmmu
+# Targets: all
+vcpu guest_cpu_reset(void)
diff --git a/trace-events b/trace-events
index 1181486..01cd176 100644
--- a/trace-events
+++ b/trace-events
@@ -141,12 +141,6 @@ memory_region_ram_device_write(int cpu_index, void *mr, uint64_t addr, uint64_t
 # Targets: all
 vcpu guest_cpu_enter(void)
 
-# Reset the state of a virtual (guest) CPU
-#
-# Mode: user, softmmu
-# Targets: all
-vcpu guest_cpu_reset(void)
-
 # @vaddr: Access' virtual address.
 # @info : Access' information (see below).
 #
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 43/47] trace: switch linux-user/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (41 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 42/47] trace: switch qom/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 44/47] trace: switch qapi/ " Daniel P. Berrange
                   ` (5 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the linux-user/ directory to include the
linux-user/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs            | 2 +-
 linux-user/Makefile.objs | 2 ++
 linux-user/signal.c      | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index cfef83b..abdc0a8 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -161,7 +161,7 @@ trace-events-subdirs += target/sparc
 trace-events-subdirs += target/s390x
 trace-events-subdirs += target/ppc
 trace-events-subdirs += qom
-trace-events-y += linux-user/trace-events
+trace-events-subdirs += linux-user
 trace-events-y += qapi/trace-events
 
 trace-events-files = $(trace-events-y) $(trace-events-subdirs:%=%/trace-events)
diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs
index 8c93058..7a05775 100644
--- a/linux-user/Makefile.objs
+++ b/linux-user/Makefile.objs
@@ -6,3 +6,5 @@ obj-$(TARGET_HAS_BFLT) += flatload.o
 obj-$(TARGET_I386) += vm86.o
 obj-$(TARGET_ARM) += arm/nwfpe/
 obj-$(TARGET_M68K) += m68k-sim.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/linux-user/signal.c b/linux-user/signal.c
index c750053..8bc327c 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -24,7 +24,7 @@
 #include "qemu.h"
 #include "qemu-common.h"
 #include "target_signal.h"
-#include "trace.h"
+#include "linux-user/trace.h"
 
 static struct target_sigaltstack target_sigaltstack_used = {
     .ss_sp = 0,
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 44/47] trace: switch qapi/ directory to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (42 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 43/47] trace: switch linux-user/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 45/47] trace: remove the global include/trace.h file Daniel P. Berrange
                   ` (4 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch files in the qapi/ directory to include the
qapi/trace.h file instead of the global trace.h
file.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 Makefile.objs          | 2 +-
 qapi/Makefile.objs     | 2 ++
 qapi/qapi-visit-core.c | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index abdc0a8..e8cbaa2 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -162,7 +162,7 @@ trace-events-subdirs += target/s390x
 trace-events-subdirs += target/ppc
 trace-events-subdirs += qom
 trace-events-subdirs += linux-user
-trace-events-y += qapi/trace-events
+trace-events-subdirs += qapi
 
 trace-events-files = $(trace-events-y) $(trace-events-subdirs:%=%/trace-events)
 
diff --git a/qapi/Makefile.objs b/qapi/Makefile.objs
index 33906ff..3c85604 100644
--- a/qapi/Makefile.objs
+++ b/qapi/Makefile.objs
@@ -4,3 +4,5 @@ util-obj-y += string-input-visitor.o string-output-visitor.o
 util-obj-y += opts-visitor.o qapi-clone-visitor.o
 util-obj-y += qmp-event.o
 util-obj-y += qapi-util.o
+trace-obj-y += trace.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
index 63bd97b..052d4e1 100644
--- a/qapi/qapi-visit-core.c
+++ b/qapi/qapi-visit-core.c
@@ -19,7 +19,7 @@
 #include "qapi/qmp/qerror.h"
 #include "qapi/visitor.h"
 #include "qapi/visitor-impl.h"
-#include "trace.h"
+#include "qapi/trace.h"
 
 void visit_complete(Visitor *v, void *opaque)
 {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 45/47] trace: remove the global include/trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (43 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 44/47] trace: switch qapi/ " Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 46/47] trace: update docs to reflect new code generation approach Daniel P. Berrange
                   ` (3 subsequent siblings)
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Switch to generating top level trace.[hc] files, instead
of using include/trace.h with trace/generated-tracers.[ch],
so the top level directory works in the same manner as
all the sub-dirs.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 .gitignore                               | 10 ++--
 Makefile                                 | 64 +++++++++++++++++------
 Makefile.objs                            |  8 +--
 include/trace.h                          |  6 ---
 scripts/tracetool/backend/dtrace.py      |  7 +--
 scripts/tracetool/backend/ust.py         |  7 +--
 scripts/tracetool/format/ust_events_c.py |  2 +-
 scripts/tracetool/format/ust_events_h.py |  2 +-
 trace/Makefile.objs                      | 90 --------------------------------
 9 files changed, 61 insertions(+), 135 deletions(-)
 delete mode 100644 include/trace.h

diff --git a/.gitignore b/.gitignore
index fe6add3..79ae620 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,18 +6,14 @@
 /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
+/trace/trace-ust-all.h
+/trace/trace-ust-all.c
 /ui/shader/texture-blit-frag.h
 /ui/shader/texture-blit-vert.h
 *-timestamp
@@ -113,7 +109,7 @@ docker-src.*
 *~
 trace.h
 trace.c
-trace-events-common
+trace-ust.h
 trace-ust.h
 trace-dtrace.h
 trace-dtrace.dtrace
diff --git a/Makefile b/Makefile
index 181802b..c3bf6cd 100644
--- a/Makefile
+++ b/Makefile
@@ -56,35 +56,28 @@ GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c qapi-event.c
 GENERATED_HEADERS += qmp-introspect.h
 GENERATED_SOURCES += qmp-introspect.c
 
-GENERATED_HEADERS += trace/generated-tracers.h
-ifeq ($(findstring dtrace,$(TRACE_BACKENDS)),dtrace)
-GENERATED_HEADERS += trace/generated-tracers-dtrace.h
-endif
-GENERATED_SOURCES += trace/generated-tracers.c
-
 GENERATED_HEADERS += trace/generated-tcg-tracers.h
 
 GENERATED_HEADERS += trace/generated-helpers-wrappers.h
 GENERATED_HEADERS += trace/generated-helpers.h
 GENERATED_SOURCES += trace/generated-helpers.c
 
-ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust)
-GENERATED_HEADERS += trace/generated-ust-provider.h
-GENERATED_HEADERS += trace/generated-ust-provider-all.h
-GENERATED_SOURCES += trace/generated-ust.c
+ifdef CONFIG_TRACE_UST
+GENERATED_HEADERS += trace-ust-all.h
+GENERATED_SOURCES += trace-ust-all.c
 endif
 
 GENERATED_HEADERS += module_block.h
 
-GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace.h)
-GENERATED_SOURCES += $(trace-events-subdirs:%=%/trace.c)
+GENERATED_HEADERS += trace.h $(trace-events-subdirs:%=%/trace.h)
+GENERATED_SOURCES += trace.c $(trace-events-subdirs:%=%/trace.c)
 GENERATED_DTRACE =
 ifdef CONFIG_TRACE_DTRACE
-GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-dtrace.h)
-GENERATED_DTRACE += $(trace-events-subdirs:%=%/trace-dtrace.dtrace)
+GENERATED_HEADERS += trace-dtrace.h $(trace-events-subdirs:%=%/trace-dtrace.h)
+GENERATED_DTRACE += trace-dtrace.dtrace $(trace-events-subdirs:%=%/trace-dtrace.dtrace)
 endif
 ifdef CONFIG_TRACE_UST
-GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-ust.h)
+GENERATED_HEADERS += trace-ust.h $(trace-events-subdirs:%=%/trace-ust.h)
 endif
 
 %/trace.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
@@ -117,6 +110,47 @@ endif
 %/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y)
 
 
+trace.h: $(SRC_PATH)/trace-events $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=h \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$@")
+
+trace.c: $(SRC_PATH)/trace-events $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=c \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$@")
+
+trace-ust.h: $(SRC_PATH)/trace-events $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=ust-events-h \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$@")
+
+trace-ust-all.h: $(BUILD_DIR)/trace-events-all $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=ust-events-h \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$@")
+
+trace-ust-all.c: $(BUILD_DIR)/trace-events-all $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=ust-events-c \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$@")
+
+trace-dtrace.dtrace: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+	$(call quiet-command,$(TRACETOOL) \
+		--format=d \
+		--backends=$(TRACE_BACKENDS) \
+		$< > $@,"GEN","$@")
+
+trace-dtrace.h: trace-dtrace.dtrace
+	$(call quiet-command,dtrace -o $@ -h -s $<, "GEN","$@")
+
+trace-dtrace.o: trace-dtrace.dtrace
+
 # Don't try to regenerate Makefile or configure
 # We don't generate any of them
 Makefile: ;
diff --git a/Makefile.objs b/Makefile.objs
index e8cbaa2..b53a6fb 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -119,7 +119,6 @@ ivshmem-server-obj-y = contrib/ivshmem-server/
 
 ######################################################################
 trace-events-subdirs =
-trace-events-y = trace-events
 trace-events-subdirs += util
 trace-events-subdirs += crypto
 trace-events-subdirs += io
@@ -164,6 +163,9 @@ trace-events-subdirs += qom
 trace-events-subdirs += linux-user
 trace-events-subdirs += qapi
 
-trace-events-files = $(trace-events-y) $(trace-events-subdirs:%=%/trace-events)
+trace-events-files = trace-events $(trace-events-subdirs:%=%/trace-events)
 
-trace-obj-y = $(trace-events-subdirs:%=%/)
+trace-obj-y = trace.o
+trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
+trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
+trace-obj-y += $(trace-events-subdirs:%=%/)
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/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
index 1319990..6df33fc 100644
--- a/scripts/tracetool/backend/dtrace.py
+++ b/scripts/tracetool/backend/dtrace.py
@@ -36,12 +36,7 @@ def binary():
 
 
 def generate_h_begin(events, group):
-    if group == "common":
-        include = "trace/generated-tracers-dtrace.h"
-    else:
-        include = "trace-dtrace.h"
-
-    out('#include "%s"' % include,
+    out('#include "trace-dtrace.h"',
         '')
 
 
diff --git a/scripts/tracetool/backend/ust.py b/scripts/tracetool/backend/ust.py
index 599c12e..92b2837 100644
--- a/scripts/tracetool/backend/ust.py
+++ b/scripts/tracetool/backend/ust.py
@@ -20,13 +20,8 @@ PUBLIC = True
 
 
 def generate_h_begin(events, group):
-    if group == "common":
-        include = "trace/generated-ust-provider.h"
-    else:
-        include = "trace-ust.h"
-
     out('#include <lttng/tracepoint.h>',
-        '#include "%s"' % include,
+        '#include "trace-ust.h"',
         '')
 
 
diff --git a/scripts/tracetool/format/ust_events_c.py b/scripts/tracetool/format/ust_events_c.py
index 8be8116..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-all.h"')
+        '#include "trace-ust-all.h"')
diff --git a/scripts/tracetool/format/ust_events_h.py b/scripts/tracetool/format/ust_events_h.py
index 6fbdb9f..80574ed 100644
--- a/scripts/tracetool/format/ust_events_h.py
+++ b/scripts/tracetool/format/ust_events_h.py
@@ -21,7 +21,7 @@ def generate(events, backend, group):
               if "disabled" not in e.properties]
 
     if group == "common":
-        include = "generated-ust-provider.h"
+        include = "trace-ust-all.h"
     else:
         include = "trace-ust.h"
 
diff --git a/trace/Makefile.objs b/trace/Makefile.objs
index 4522914..5fb70b2 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -11,94 +11,6 @@ tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
 $(BUILD_DIR)/trace-events-all: $(trace-events-files:%=$(SRC_PATH)/%)
 	$(call quiet-command,cat $^ > $@)
 
-$(BUILD_DIR)/trace-events-common: $(trace-events-y:%=$(SRC_PATH)/%) Makefile.objs
-	$(call quiet-command,cat $(trace-events-y:%=$(SRC_PATH)/%) > $@)
-
-######################################################################
-# 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-common $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--format=ust-events-h \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-
-$(obj)/generated-ust-provider-all.h: $(obj)/generated-ust-provider-all.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-ust-provider-all.h-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--format=ust-events-h \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-
-$(obj)/generated-ust.c: $(obj)/generated-ust.c-timestamp $(BUILD_DIR)/config-host.mak
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-ust.c-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--format=ust-events-c \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-
-$(obj)/generated-tracers.h: $(obj)/generated-ust-provider.h $(obj)/generated-ust-provider-all.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-common $(BUILD_DIR)/config-host.mak $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--format=h \
-		--backends=$(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-common $(BUILD_DIR)/config-host.mak $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--format=c \
-		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
-
-$(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.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.dtrace-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-tracers-dtrace.dtrace-timestamp: $(BUILD_DIR)/trace-events-common $(BUILD_DIR)/config-host.mak $(tracetool-y)
-	$(call quiet-command,$(TRACETOOL) \
-		--format=d \
-		--backends=$(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 += generated-tracers-dtrace.o
-endif
 
 ##################################################
 # Translation level
@@ -144,10 +56,8 @@ $(obj)/generated-tcg-tracers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_
 ######################################################################
 # Backend code
 
-util-obj-y += generated-tracers.o
 util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
 util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
-util-obj-$(CONFIG_TRACE_UST) += generated-ust.o
 util-obj-y += control.o
 target-obj-y += control-target.o
 util-obj-y += qmp.o
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 46/47] trace: update docs to reflect new code generation approach
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (44 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 45/47] trace: remove the global include/trace.h file Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 17:26   ` Lluís Vilanova
  2017-01-06 18:13   ` Eric Blake
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 47/47] trace: improve error reporting when parsing simpletrace header Daniel P. Berrange
                   ` (2 subsequent siblings)
  48 siblings, 2 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Daniel P. Berrange

Describe use of per-subdir trace events files and how it impacts
code generation.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 docs/tracing.txt | 61 +++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 52 insertions(+), 9 deletions(-)

diff --git a/docs/tracing.txt b/docs/tracing.txt
index f351998a..3262a61 100644
--- a/docs/tracing.txt
+++ b/docs/tracing.txt
@@ -27,18 +27,51 @@ for debugging, profiling, and observing execution.
 
 == Trace events ==
 
+=== Sub-directory setup ===
+
 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 "trace-events" file. The first (non-comment) statement in the file
+must be "@id_offset(NN)" where NN is an integer that is unique among all
+"trace-events" files in the QEMU source tree. The IDs can be arbitrarily
+chosen, but for extra fun the current "trace-events" files use values from
+the "powerful number" integer sequence :-)
 
-    qemu_vmalloc(size_t size, void *ptr) "size %zu ptr %p"
-    qemu_vfree(void *ptr) "ptr %p"
+Any subdirectory which contains a "trace-events" file 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.
+
+The individual "trace-events" files are merged together into a "trace-events-all"
+file, which is also installed into "/usr/share/qemu" with the name "trace-events".
+This merge file is to be used by the "simpletrace.py" script to later analyse
+traces in the simpletrace data format.
+
+The Makefile.objs in the subdirectory should have two lines added
+
+  trace-obj-y += trace.o
+  trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
+
+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 speci
+ - 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 only #include the 'trace.h'
+file and use the full sub-directory path. eg io/channel-buffer.c
+would do
 
-All "trace-events" files must be listed in the "trace-event-y" make variable
-in the top level Makefile.objs. During build the individual files are combined
-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".
+  #include "io/trace.h"
+
+While it is permited 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.
+
+=== Using trace events ===
 
 Trace events are invoked directly from source code like this:
 
@@ -83,6 +116,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.
 
+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"
+
+
 === Hints for adding new trace events ===
 
 1. Trace state changes in the code.  Interesting points in the code usually
@@ -372,6 +412,9 @@ information. If used together with the "tcg" property, it adds a second
 "TCGv_env" argument that must point to the per-target global TCG register that
 points to the vCPU when guest code is executed (usually the "cpu_env" variable).
 
+All "vcpu" events *must* be declared in the top level "trace-events" file. It
+is not permitted to have them declared in sub-directories.
+
 The following example events:
 
     foo(uint32_t a) "a=%x"
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* [Qemu-devel] [PATCH v2 47/47] trace: improve error reporting when parsing simpletrace header
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (45 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 46/47] trace: update docs to reflect new code generation approach Daniel P. Berrange
@ 2017-01-06 15:55 ` Daniel P. Berrange
  2017-01-06 18:15   ` Eric Blake
  2017-01-10 16:40   ` Stefan Hajnoczi
  2017-01-06 16:05 ` [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
  2017-01-06 17:02 ` no-reply
  48 siblings, 2 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 15:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, 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.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 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 = read_header(fobj, log_header_fmt)
-    if header is None or \
-       header[0] != header_event_id or \
-       header[1] != header_magic:
+    if header is None:
         raise ValueError('Not a valid trace file!')
+    if header[0] != header_event_id:
+        raise ValueError('Not a valid trace file, header id %d != %d' %
+                         (header[0], header_event_id))
+    if header[1] != header_magic:
+        raise ValueError('Not a valid trace file, header magic %d != %d' %
+                         (header[1], header_magic))
 
     log_version = header[2]
     if log_version not in [0, 2, 3, 4]:
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (46 preceding siblings ...)
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 47/47] trace: improve error reporting when parsing simpletrace header Daniel P. Berrange
@ 2017-01-06 16:05 ` Daniel P. Berrange
  2017-01-06 17:02 ` no-reply
  48 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 16:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi

On Fri, Jan 06, 2017 at 03:54:56PM +0000, Daniel P. Berrange wrote:
> This is the final part of my trace events refactoring.
> 
> Previously we merged code that split trace-events up
> into one file per sub-directory. We also merged code
> to the code-generator that enables us to generate
> and use multiple independant sets of trace events.
> 
> This is the final glue that makes use of these two
> earlier changes, so that we actually generate a
> separate trace.h & trace.c file per sub-directory.
> 
> The result is that when adding a new trace event to
> a file, only files in that sub-directory get rebuilt.
> Theoretically the build is faster too, since each
> source file includes a much smaller trace.h that
> only contains probes relevant to it. In reality this
> speed benefit is probably marginal & lost in the noise.
> 
> The first patch introduces the new Makefile rules to
> handle modular building.
> 
> The next 43 patches convert over each sub-directory.
> They are totally boring and repetative. The only
> exception is the patch for target/s390x which hit
> a bit of makefile pain, explained in its commit msg.
> 
> The 45th patch removes the old, now unused, Makefile
> rules for non-modular trace building.
> 
> The 46th patch documents the new approach
> 
> The final patch is just a small tweak to error
> reporting, unrelated to the refactoring.

Oh I should say I tested this with

 ./configure --enable-trace-backends=log,simple,ust,nop,dtrace,ftrace,syslog

ie, all user + system emulators enabled and all trace backends
enabled.

Before rebasing to current git master I had also done the
same, testing against each patch in the series, so it should
be fully bisectable. It's also been through the standard travis
tests.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file
  2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
                   ` (47 preceding siblings ...)
  2017-01-06 16:05 ` [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
@ 2017-01-06 17:02 ` no-reply
  2017-01-06 17:23   ` Daniel P. Berrange
  48 siblings, 1 reply; 83+ messages in thread
From: no-reply @ 2017-01-06 17:02 UTC (permalink / raw)
  To: berrange; +Cc: famz, qemu-devel, stefanha

Hi,

Your series failed automatic build test. Please find the testing commands and
their output below. If you have docker installed, you can probably reproduce it
locally.

Subject: [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file
Message-id: 20170106155543.12827-1-berrange@redhat.com
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
# Let docker tests dump environment info
export SHOW_ENV=1
export J=16
make docker-test-quick@centos6
make docker-test-mingw@fedora
make docker-test-build@min-glib
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
eadd34c trace: improve error reporting when parsing simpletrace header
076c183 trace: update docs to reflect new code generation approach
56abbd5 trace: remove the global include/trace.h file
73c3b5d trace: switch qapi/ directory to modular trace.h file
33504fb trace: switch linux-user/ directory to modular trace.h file
6419084 trace: switch qom/ directory to modular trace.h file
7457a87 trace: switch target/ppc/ directory to modular trace.h file
0b41d5c trace: switch target/s390x/ directory to modular trace.h file
b42b6c3 trace: switch target/sparc/ directory to modular trace.h file
1307ebe trace: switch target/i386/ directory to modular trace.h file
6e542cd trace: switch target/arm/ directory to modular trace.h file
22ba2b6 trace: switch net/ directory to modular trace.h file
b4543ff trace: switch audio/ directory to modular trace.h file
db9e252 trace: switch ui/ directory to modular trace.h file
25c8624 trace: switch hw/alpha/ directory to modular trace.h file
49d55bd trace: switch hw/arm/ directory to modular trace.h file
3ba684c trace: switch hw/acpi/ directory to modular trace.h file
8ddce57 trace: switch hw/vfio/ directory to modular trace.h file
1260fe3 trace: switch hw/s390x/ directory to modular trace.h file
7a75eba trace: switch hw/pci/ directory to modular trace.h file
f832114 trace: switch hw/ppc/ directory to modular trace.h file
272c571 trace: switch hw/9pfs/ directory to modular trace.h file
4892099 trace: switch hw/i386/ directory to modular trace.h file
91709d5 trace: switch hw/mem/ directory to modular trace.h file
68b9a83 trace: switch hw/isa/ directory to modular trace.h file
b5b830d trace: switch hw/sd/ directory to modular trace.h file
cb676b1 trace: switch hw/sparc/ directory to modular trace.h file
bac0e03 trace: switch hw/dma/ directory to modular trace.h file
76d03a3 trace: switch hw/timer/ directory to modular trace.h file
07da4f5 trace: switch hw/input/ directory to modular trace.h file
be5e938 trace: switch hw/display/ directory to modular trace.h file
eaf5f53 trace: switch hw/nvram/ directory to modular trace.h file
5a85878 trace: switch hw/scsi/ directory to modular trace.h file
9bcc3ef trace: switch hw/usb/ directory to modular trace.h file
174956d trace: switch hw/misc/ directory to modular trace.h file
00912c2 trace: switch hw/audio/ directory to modular trace.h file
cc6dd6e trace: switch hw/virtio/ directory to modular trace.h file
83851d0 trace: switch hw/net/ directory to modular trace.h file
c999aa6 trace: switch hw/intc/ directory to modular trace.h file
ce8c290 trace: switch hw/char/ directory to modular trace.h file
095ad47 trace: switch hw/block/ directory to modular trace.h file
5e7dfd2 trace: switch block/ directory to modular trace.h file
b95f06b trace: switch migration/ directory to modular trace.h file
bf46cdf trace: switch crypto/ directory to modular trace.h file
308c34b trace: switch util/ directory to modular trace.h file
e0e2728 trace: switch io/ directory to modular trace.h file
cabc296 trace: introduce some Makefile rules for module code gen

=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into 'dtc'...
Submodule path 'dtc': checked out '65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf'
  BUILD   centos6
make[1]: Entering directory `/var/tmp/patchew-tester-tmp-x9xsss8m/src'
  ARCHIVE qemu.tgz
  ARCHIVE dtc.tgz
  COPY    RUNNER
    RUN test-quick in qemu:centos6 
Packages installed:
SDL-devel-1.2.14-7.el6_7.1.x86_64
ccache-3.1.6-2.el6.x86_64
epel-release-6-8.noarch
gcc-4.4.7-17.el6.x86_64
git-1.7.1-4.el6_7.1.x86_64
glib2-devel-2.28.8-5.el6.x86_64
libfdt-devel-1.4.0-1.el6.x86_64
make-3.81-23.el6.x86_64
package g++ is not installed
pixman-devel-0.32.8-1.el6.x86_64
tar-1.23-15.el6_8.x86_64
zlib-devel-1.2.3-29.el6.x86_64

Environment variables:
PACKAGES=libfdt-devel ccache     tar git make gcc g++     zlib-devel glib2-devel SDL-devel pixman-devel     epel-release
HOSTNAME=8c2845dd82aa
TERM=xterm
MAKEFLAGS= -j16
HISTSIZE=1000
J=16
USER=root
CCACHE_DIR=/var/tmp/ccache
EXTRA_CONFIGURE_OPTS=
V=
SHOW_ENV=1
MAIL=/var/spool/mail/root
PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/
LANG=en_US.UTF-8
TARGET_LIST=
HISTCONTROL=ignoredups
SHLVL=1
HOME=/root
TEST_DIR=/tmp/qemu-test
LOGNAME=root
LESSOPEN=||/usr/bin/lesspipe.sh %s
FEATURES= dtc
DEBUG=
G_BROKEN_FILENAMES=1
CCACHE_HASHDIR=
_=/usr/bin/env

Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/var/tmp/qemu-build/install
No C++ compiler available; disabling C++ specific optional code
Install prefix    /var/tmp/qemu-build/install
BIOS directory    /var/tmp/qemu-build/install/share/qemu
binary directory  /var/tmp/qemu-build/install/bin
library directory /var/tmp/qemu-build/install/lib
module directory  /var/tmp/qemu-build/install/lib/qemu
libexec directory /var/tmp/qemu-build/install/libexec
include directory /var/tmp/qemu-build/install/include
config directory  /var/tmp/qemu-build/install/etc
local state directory   /var/tmp/qemu-build/install/var
Manual directory  /var/tmp/qemu-build/install/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /tmp/qemu-test/src
C compiler        cc
Host C compiler   cc
C++ compiler      
Objective-C compiler cc
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS       -I/usr/include/pixman-1    -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv  -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-all
LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g 
make              make
install           install
python            python -B
smbd              /usr/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no
target list       x86_64-softmmu aarch64-softmmu
tcg debug enabled no
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
pixman            system
SDL support       yes (1.2.14)
GTK support       no 
GTK GL support    no
VTE support       no 
TLS priority      NORMAL
GNUTLS support    no
GNUTLS rnd        no
libgcrypt         no
libgcrypt kdf     no
nettle            no 
nettle kdf        no
libtasn1          no
curses support    no
virgl support     no
curl support      no
mingw32 support   no
Audio drivers     oss
Block whitelist (rw) 
Block whitelist (ro) 
VirtFS support    no
VNC support       yes
VNC SASL support  no
VNC JPEG support  no
VNC PNG support   no
xen support       no
brlapi support    no
bluez  support    no
Documentation     no
PIE               yes
vde support       no
netmap support    no
Linux AIO support no
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
COLO support      yes
RDMA support      no
TCG interpreter   no
fdt support       yes
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
libcap-ng support no
vhost-net support yes
vhost-scsi support yes
vhost-vsock support yes
Trace backends    log
spice support     no 
rbd support       no
xfsctl support    no
smartcard support no
libusb            no
usb net redir     no
OpenGL support    no
OpenGL dmabufs    no
libiscsi support  no
libnfs support    no
build guest agent yes
QGA VSS support   no
QGA w32 disk info no
QGA MSI support   no
seccomp support   no
coroutine backend ucontext
coroutine pool    yes
debug stack usage no
GlusterFS support no
Archipelago support no
gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   no
TPM passthrough   yes
QOM debugging     yes
lzo support       no
snappy support    no
bzip2 support     no
NUMA host support no
tcmalloc support  no
jemalloc support  no
avx2 optimization no
replication support yes
  GEN     x86_64-softmmu/config-devices.mak.tmp
  GEN     aarch64-softmmu/config-devices.mak.tmp
  GEN     config-host.h
  GEN     qemu-options.def
  GEN     qmp-commands.h
  GEN     qapi-types.h
  GEN     qapi-visit.h
  GEN     trace.h
  GEN     qapi-event.h
  GEN     qmp-introspect.h
  GEN     module_block.h
  GEN     util/trace.h
  GEN     crypto/trace.h
  GEN     io/trace.h
  GEN     migration/trace.h
  GEN     block/trace.h
  GEN     x86_64-softmmu/config-devices.mak
  GEN     aarch64-softmmu/config-devices.mak
  GEN     hw/block/trace.h
  GEN     hw/char/trace.h
  GEN     hw/intc/trace.h
  GEN     hw/net/trace.h
  GEN     hw/virtio/trace.h
  GEN     hw/audio/trace.h
  GEN     hw/misc/trace.h
  GEN     hw/usb/trace.h
  GEN     hw/scsi/trace.h
  GEN     hw/nvram/trace.h
  GEN     hw/display/trace.h
  GEN     hw/input/trace.h
  GEN     hw/timer/trace.h
  GEN     hw/dma/trace.h
  GEN     hw/sparc/trace.h
  GEN     hw/sd/trace.h
  GEN     hw/isa/trace.h
  GEN     hw/mem/trace.h
  GEN     hw/i386/trace.h
  GEN     hw/9pfs/trace.h
  GEN     hw/ppc/trace.h
  GEN     hw/pci/trace.h
  GEN     hw/s390x/trace.h
  GEN     hw/vfio/trace.h
  GEN     hw/acpi/trace.h
  GEN     hw/arm/trace.h
  GEN     hw/alpha/trace.h
  GEN     ui/trace.h
  GEN     audio/trace.h
  GEN     net/trace.h
  GEN     target/arm/trace.h
  GEN     target/i386/trace.h
  GEN     target/sparc/trace.h
  GEN     target/s390x/trace.h
  GEN     target/ppc/trace.h
  GEN     qom/trace.h
  GEN     linux-user/trace.h
  GEN     qapi/trace.h
  GEN     tests/test-qapi-types.h
  GEN     tests/test-qapi-visit.h
  GEN     tests/test-qmp-commands.h
  GEN     tests/test-qapi-event.h
  GEN     tests/test-qmp-introspect.h
  GEN     config-all-devices.mak
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-helpers.h
  CC      tests/qemu-iotests/socket_scm_helper.o
  GEN     qga/qapi-generated/qga-qapi-types.h
  GEN     qga/qapi-generated/qga-qapi-visit.h
  GEN     qga/qapi-generated/qga-qmp-commands.h
  GEN     qga/qapi-generated/qga-qapi-types.c
  GEN     qga/qapi-generated/qga-qapi-visit.c
  GEN     qga/qapi-generated/qga-qmp-marshal.c
  GEN     crypto/trace.c
  GEN     trace.c
  GEN     audio/trace.c
  GEN     block/trace.c
  GEN     hw/9pfs/trace.c
  GEN     hw/acpi/trace.c
  GEN     hw/alpha/trace.c
  GEN     hw/arm/trace.c
  GEN     hw/audio/trace.c
  GEN     hw/block/trace.c
  GEN     hw/char/trace.c
  GEN     hw/display/trace.c
  GEN     hw/dma/trace.c
  GEN     hw/i386/trace.c
  GEN     hw/input/trace.c
  GEN     hw/intc/trace.c
  GEN     hw/isa/trace.c
  GEN     hw/mem/trace.c
  GEN     hw/misc/trace.c
  GEN     hw/net/trace.c
  GEN     hw/nvram/trace.c
  GEN     hw/pci/trace.c
  GEN     hw/ppc/trace.c
  GEN     hw/s390x/trace.c
  GEN     hw/scsi/trace.c
  GEN     hw/sd/trace.c
  GEN     hw/sparc/trace.c
  GEN     hw/timer/trace.c
  GEN     hw/usb/trace.c
  GEN     hw/vfio/trace.c
  GEN     hw/virtio/trace.c
  GEN     io/trace.c
  GEN     linux-user/trace.c
  GEN     migration/trace.c
  GEN     net/trace.c
  GEN     qapi/trace.c
  GEN     qom/trace.c
  GEN     target/arm/trace.c
  GEN     target/i386/trace.c
  GEN     target/ppc/trace.c
  GEN     target/s390x/trace.c
  GEN     target/sparc/trace.c
  GEN     ui/trace.c
  GEN     util/trace.c
  GEN     qmp-introspect.c
  GEN     qapi-types.c
  GEN     qapi-visit.c
  GEN     qapi-event.c
  CC      qapi/qapi-visit-core.o
  CC      qapi/qapi-dealloc-visitor.o
  CC      qapi/qobject-input-visitor.o
  CC      qapi/qobject-output-visitor.o
  CC      qapi/qmp-registry.o
  CC      qapi/qmp-dispatch.o
  CC      qapi/string-input-visitor.o
  CC      qapi/string-output-visitor.o
  CC      qapi/opts-visitor.o
  CC      qapi/qapi-clone-visitor.o
  CC      qapi/qmp-event.o
  CC      qapi/qapi-util.o
  CC      qobject/qnull.o
  CC      qobject/qint.o
  CC      qobject/qstring.o
  CC      qobject/qdict.o
  CC      qobject/qlist.o
  CC      qobject/qfloat.o
  CC      qobject/qbool.o
  CC      qobject/qjson.o
  CC      qobject/qobject.o
  CC      qobject/json-lexer.o
  CC      qobject/json-streamer.o
  CC      qobject/json-parser.o
  CC      trace/control.o
  CC      trace/qmp.o
  CC      util/osdep.o
  CC      util/cutils.o
  CC      util/unicode.o
  CC      util/qemu-timer-common.o
  CC      util/bufferiszero.o
  CC      util/compatfd.o
  CC      util/mmap-alloc.o
  CC      util/event_notifier-posix.o
  CC      util/oslib-posix.o
  CC      util/qemu-openpty.o
  CC      util/qemu-thread-posix.o
  CC      util/memfd.o
  CC      util/envlist.o
  CC      util/path.o
  CC      util/module.o
  CC      util/bitmap.o
  CC      util/bitops.o
  CC      util/hbitmap.o
  CC      util/acl.o
  CC      util/fifo8.o
  CC      util/error.o
  CC      util/qemu-error.o
  CC      util/id.o
  CC      util/iov.o
  CC      util/qemu-config.o
  CC      util/qemu-sockets.o
  CC      util/uri.o
  CC      util/notify.o
  CC      util/qemu-option.o
  CC      util/qemu-progress.o
  CC      util/hexdump.o
  CC      util/crc32c.o
  CC      util/throttle.o
  CC      util/uuid.o
  CC      util/getauxval.o
  CC      util/readline.o
  CC      util/rcu.o
  CC      util/qemu-coroutine.o
  CC      util/qemu-coroutine-lock.o
  CC      util/qemu-coroutine-io.o
  CC      util/qemu-coroutine-sleep.o
  CC      util/coroutine-ucontext.o
  CC      util/buffer.o
  CC      util/timed-average.o
  CC      util/base64.o
  CC      util/log.o
  CC      util/qdist.o
  CC      util/qht.o
  CC      util/range.o
  CC      crypto/pbkdf-stub.o
  CC      stubs/arch-query-cpu-def.o
  CC      stubs/arch-query-cpu-model-expansion.o
  CC      stubs/arch-query-cpu-model-comparison.o
  CC      stubs/arch-query-cpu-model-baseline.o
  CC      stubs/bdrv-next-monitor-owned.o
  CC      stubs/blk-commit-all.o
  CC      stubs/blockdev-close-all-bdrv-states.o
  CC      stubs/clock-warp.o
  CC      stubs/cpu-get-clock.o
  CC      stubs/cpu-get-icount.o
  CC      stubs/dump.o
  CC      stubs/error-printf.o
  CC      stubs/fdset-add-fd.o
  CC      stubs/fdset-find-fd.o
  CC      stubs/fdset-get-fd.o
  CC      stubs/fdset-remove-fd.o
  CC      stubs/gdbstub.o
  CC      stubs/get-fd.o
  CC      stubs/get-next-serial.o
  CC      stubs/get-vm-name.o
  CC      stubs/iothread.o
  CC      stubs/iothread-lock.o
  CC      stubs/is-daemonized.o
  CC      stubs/machine-init-done.o
  CC      stubs/migr-blocker.o
  CC      stubs/mon-is-qmp.o
  CC      stubs/monitor-init.o
  CC      stubs/notify-event.o
  CC      stubs/qtest.o
  CC      stubs/replay.o
  CC      stubs/replay-user.o
  CC      stubs/reset.o
  CC      stubs/runstate-check.o
  CC      stubs/set-fd-handler.o
  CC      stubs/slirp.o
  CC      stubs/sysbus.o
  CC      stubs/trace-control.o
  CC      stubs/uuid.o
  CC      stubs/vm-stop.o
  CC      stubs/vmstate.o
  CC      stubs/kvm.o
  CC      stubs/cpus.o
  CC      stubs/qmp_pc_dimm_device_list.o
  CC      stubs/target-monitor-defs.o
  CC      stubs/target-get-monitor-def.o
  CC      stubs/vhost.o
  CC      stubs/iohandler.o
  CC      stubs/smbios_type_38.o
  CC      stubs/ipmi.o
  CC      stubs/pc_madt_cpu_entry.o
  CC      contrib/ivshmem-client/ivshmem-client.o
  CC      stubs/migration-colo.o
  CC      contrib/ivshmem-server/ivshmem-server.o
  CC      contrib/ivshmem-client/main.o
  CC      contrib/ivshmem-server/main.o
  CC      qemu-nbd.o
  CC      async.o
  CC      thread-pool.o
  CC      block.o
  CC      blockjob.o
  CC      main-loop.o
  CC      iohandler.o
  CC      qemu-timer.o
  CC      aio-posix.o
  CC      qemu-io-cmds.o
  CC      replication.o
  CC      block/raw_bsd.o
  CC      block/qcow.o
  CC      block/vdi.o
  CC      block/vmdk.o
  CC      block/cloop.o
  CC      block/bochs.o
  CC      block/vpc.o
  CC      block/vvfat.o
  CC      block/dmg.o
  CC      block/qcow2.o
  CC      block/qcow2-refcount.o
  CC      block/qcow2-cluster.o
  CC      block/qcow2-snapshot.o
  CC      block/qcow2-cache.o
  CC      block/qed.o
  CC      block/qed-gencb.o
  CC      block/qed-l2-cache.o
  CC      block/qed-table.o
  CC      block/qed-cluster.o
  CC      block/qed-check.o
  CC      block/vhdx.o
  CC      block/vhdx-endian.o
  CC      block/vhdx-log.o
  CC      block/quorum.o
  CC      block/parallels.o
  CC      block/blkdebug.o
  CC      block/blkverify.o
  CC      block/blkreplay.o
  CC      block/block-backend.o
  CC      block/snapshot.o
  CC      block/qapi.o
  CC      block/raw-posix.o
  CC      block/null.o
  CC      block/mirror.o
  CC      block/commit.o
  CC      block/io.o
  CC      block/throttle-groups.o
  CC      block/nbd.o
  CC      block/nbd-client.o
  CC      block/sheepdog.o
  CC      block/accounting.o
  CC      block/dirty-bitmap.o
  CC      block/write-threshold.o
  CC      block/backup.o
  CC      block/replication.o
  CC      block/crypto.o
  CC      nbd/server.o
  CC      nbd/client.o
  CC      nbd/common.o
  CC      crypto/init.o
  CC      crypto/hash.o
  CC      crypto/hash-glib.o
  CC      crypto/hmac.o
  CC      crypto/hmac-glib.o
  CC      crypto/desrfb.o
  CC      crypto/aes.o
  CC      crypto/cipher.o
  CC      crypto/tlscreds.o
  CC      crypto/tlscredsanon.o
  CC      crypto/tlscredsx509.o
  CC      crypto/tlssession.o
  CC      crypto/secret.o
  CC      crypto/random-platform.o
  CC      crypto/pbkdf.o
  CC      crypto/ivgen.o
  CC      crypto/ivgen-essiv.o
  CC      crypto/ivgen-plain.o
  CC      crypto/ivgen-plain64.o
  CC      crypto/afsplit.o
  CC      crypto/xts.o
  CC      crypto/block.o
  CC      crypto/block-qcow.o
  CC      crypto/block-luks.o
  CC      io/channel.o
  CC      io/channel-command.o
  CC      io/channel-buffer.o
  CC      io/channel-file.o
  CC      io/channel-socket.o
  CC      io/channel-tls.o
  CC      io/channel-watch.o
  CC      io/channel-websock.o
  CC      io/channel-util.o
  CC      io/task.o
  CC      qom/object.o
  CC      qom/container.o
  CC      qom/qom-qobject.o
  CC      qom/object_interfaces.o
  GEN     qemu-img-cmds.h
  CC      qemu-io.o
  CC      qemu-bridge-helper.o
  CC      blockdev.o
  CC      blockdev-nbd.o
  CC      iothread.o
  CC      qdev-monitor.o
  CC      device-hotplug.o
  CC      os-posix.o
  CC      qemu-char.o
  CC      page_cache.o
  CC      accel.o
  CC      bt-host.o
  CC      bt-vhci.o
  CC      dma-helpers.o
  CC      vl.o
  CC      tpm.o
  GEN     qmp-marshal.c
  CC      device_tree.o
  CC      qmp.o
  CC      hmp.o
  CC      cpus-common.o
  CC      audio/audio.o
  CC      audio/noaudio.o
  CC      audio/wavaudio.o
  CC      audio/mixeng.o
  CC      audio/sdlaudio.o
  CC      audio/ossaudio.o
  CC      audio/wavcapture.o
  CC      backends/rng.o
  CC      backends/rng-egd.o
  CC      backends/rng-random.o
  CC      backends/msmouse.o
  CC      backends/testdev.o
  CC      backends/tpm.o
  CC      backends/hostmem.o
  CC      backends/hostmem-ram.o
  CC      backends/hostmem-file.o
  CC      backends/cryptodev.o
  CC      block/stream.o
  CC      backends/cryptodev-builtin.o
  CC      disas/arm.o
  CC      disas/i386.o
  CC      fsdev/qemu-fsdev-dummy.o
  CC      fsdev/qemu-fsdev-opts.o
  CC      hw/acpi/core.o
  CC      hw/acpi/piix4.o
  CC      hw/acpi/pcihp.o
  CC      hw/acpi/ich9.o
  CC      hw/acpi/tco.o
  CC      hw/acpi/cpu_hotplug.o
  CC      hw/acpi/memory_hotplug.o
  CC      hw/acpi/memory_hotplug_acpi_table.o
  CC      hw/acpi/cpu.o
  CC      hw/acpi/nvdimm.o
  CC      hw/acpi/acpi_interface.o
  CC      hw/acpi/bios-linker-loader.o
  CC      hw/acpi/aml-build.o
  CC      hw/audio/sb16.o
  CC      hw/acpi/ipmi.o
  CC      hw/audio/es1370.o
  CC      hw/audio/ac97.o
  CC      hw/audio/fmopl.o
  CC      hw/audio/adlib.o
  CC      hw/audio/gus.o
  CC      hw/audio/gusemu_hal.o
  CC      hw/audio/gusemu_mixer.o
  CC      hw/audio/cs4231a.o
  CC      hw/audio/hda-codec.o
  CC      hw/audio/intel-hda.o
  CC      hw/audio/pcspk.o
  CC      hw/audio/wm8750.o
  CC      hw/audio/pl041.o
  CC      hw/audio/lm4549.o
  CC      hw/audio/marvell_88w8618.o
  CC      hw/block/block.o
  CC      hw/block/cdrom.o
  CC      hw/block/hd-geometry.o
  CC      hw/block/fdc.o
  CC      hw/block/m25p80.o
  CC      hw/block/pflash_cfi01.o
  CC      hw/block/nand.o
  CC      hw/block/pflash_cfi02.o
  CC      hw/block/ecc.o
  CC      hw/block/onenand.o
  CC      hw/block/nvme.o
  CC      hw/bt/core.o
  CC      hw/bt/l2cap.o
  CC      hw/bt/sdp.o
  CC      hw/bt/hci.o
  CC      hw/bt/hid.o
  CC      hw/bt/hci-csr.o
  CC      hw/char/ipoctal232.o
  CC      hw/char/parallel.o
  CC      hw/char/pl011.o
  CC      hw/char/serial.o
  CC      hw/char/serial-isa.o
  CC      hw/char/serial-pci.o
  CC      hw/char/virtio-console.o
  CC      hw/char/cadence_uart.o
  CC      hw/char/debugcon.o
  CC      hw/char/imx_serial.o
  CC      hw/core/qdev.o
  CC      hw/core/qdev-properties.o
  CC      hw/core/bus.o
  CC      hw/core/fw-path-provider.o
  CC      hw/core/irq.o
  CC      hw/core/hotplug.o
  CC      hw/core/ptimer.o
  CC      hw/core/sysbus.o
  CC      hw/core/machine.o
  CC      hw/core/null-machine.o
  CC      hw/core/loader.o
  CC      hw/core/qdev-properties-system.o
  CC      hw/core/register.o
  CC      hw/core/or-irq.o
  CC      hw/core/platform-bus.o
  CC      hw/display/ads7846.o
  CC      hw/display/cirrus_vga.o
  CC      hw/display/pl110.o
  CC      hw/display/ssd0303.o
  CC      hw/display/ssd0323.o
  CC      hw/display/vga-pci.o
  CC      hw/display/vga-isa.o
  CC      hw/display/vmware_vga.o
  CC      hw/display/blizzard.o
  CC      hw/display/exynos4210_fimd.o
  CC      hw/display/framebuffer.o
  CC      hw/display/tc6393xb.o
  CC      hw/dma/pl080.o
  CC      hw/dma/pl330.o
  CC      hw/dma/i8257.o
  CC      hw/dma/xlnx-zynq-devcfg.o
  CC      hw/gpio/max7310.o
  CC      hw/gpio/pl061.o
  CC      hw/gpio/zaurus.o
  CC      hw/gpio/gpio_key.o
  CC      hw/i2c/core.o
  CC      hw/i2c/smbus.o
  CC      hw/i2c/smbus_eeprom.o
  CC      hw/i2c/i2c-ddc.o
  CC      hw/i2c/versatile_i2c.o
  CC      hw/i2c/smbus_ich9.o
  CC      hw/i2c/pm_smbus.o
  CC      hw/i2c/bitbang_i2c.o
  CC      hw/i2c/exynos4210_i2c.o
  CC      hw/i2c/imx_i2c.o
  CC      hw/i2c/aspeed_i2c.o
  CC      hw/ide/core.o
  CC      hw/ide/atapi.o
  CC      hw/ide/qdev.o
  CC      hw/ide/pci.o
  CC      hw/ide/piix.o
  CC      hw/ide/isa.o
  CC      hw/ide/microdrive.o
  CC      hw/ide/ahci.o
  CC      hw/input/hid.o
  CC      hw/ide/ich.o
  CC      hw/input/lm832x.o
  CC      hw/input/pckbd.o
  CC      hw/input/pl050.o
  CC      hw/input/ps2.o
  CC      hw/input/stellaris_input.o
  CC      hw/input/tsc2005.o
  CC      hw/input/vmmouse.o
  CC      hw/input/virtio-input.o
  CC      hw/input/virtio-input-hid.o
  CC      hw/input/virtio-input-host.o
  CC      hw/intc/i8259_common.o
  CC      hw/intc/i8259.o
  CC      hw/intc/pl190.o
  CC      hw/intc/imx_avic.o
  CC      hw/intc/realview_gic.o
  CC      hw/intc/ioapic_common.o
  CC      hw/intc/arm_gic_common.o
  CC      hw/intc/arm_gic.o
  CC      hw/intc/arm_gicv2m.o
  CC      hw/intc/arm_gicv3_common.o
  CC      hw/intc/arm_gicv3.o
  CC      hw/intc/arm_gicv3_dist.o
  CC      hw/intc/arm_gicv3_redist.o
  CC      hw/intc/arm_gicv3_its_common.o
  CC      hw/intc/intc.o
  CC      hw/ipack/ipack.o
  CC      hw/ipack/tpci200.o
  CC      hw/ipmi/ipmi.o
  CC      hw/ipmi/ipmi_bmc_sim.o
  CC      hw/ipmi/ipmi_bmc_extern.o
  CC      hw/ipmi/isa_ipmi_kcs.o
  CC      hw/ipmi/isa_ipmi_bt.o
  CC      hw/isa/isa-bus.o
  CC      hw/isa/apm.o
/tmp/qemu-test/src/hw/char/pl011.c: In function ‘pl011_update’:
/tmp/qemu-test/src/hw/char/pl011.c:62: warning: implicit declaration of function ‘trace_pl011_irq_state’
/tmp/qemu-test/src/hw/char/pl011.c:62: warning: nested extern declaration of ‘trace_pl011_irq_state’
/tmp/qemu-test/src/hw/char/pl011.c: In function ‘pl011_read’:
/tmp/qemu-test/src/hw/char/pl011.c:87: warning: implicit declaration of function ‘trace_pl011_read_fifo’
/tmp/qemu-test/src/hw/char/pl011.c:87: warning: nested extern declaration of ‘trace_pl011_read_fifo’
/tmp/qemu-test/src/hw/char/pl011.c:139: warning: implicit declaration of function ‘trace_pl011_read’
/tmp/qemu-test/src/hw/char/pl011.c:139: warning: nested extern declaration of ‘trace_pl011_read’
/tmp/qemu-test/src/hw/char/pl011.c: In function ‘pl011_write’:
/tmp/qemu-test/src/hw/char/pl011.c:163: warning: implicit declaration of function ‘trace_pl011_write’
/tmp/qemu-test/src/hw/char/pl011.c:163: warning: nested extern declaration of ‘trace_pl011_write’
/tmp/qemu-test/src/hw/char/pl011.c: In function ‘pl011_can_receive’:
/tmp/qemu-test/src/hw/char/pl011.c:237: warning: implicit declaration of function ‘trace_pl011_can_receive’
/tmp/qemu-test/src/hw/char/pl011.c:237: warning: nested extern declaration of ‘trace_pl011_can_receive’
/tmp/qemu-test/src/hw/char/pl011.c: In function ‘pl011_put_fifo’:
/tmp/qemu-test/src/hw/char/pl011.c:252: warning: implicit declaration of function ‘trace_pl011_put_fifo’
/tmp/qemu-test/src/hw/char/pl011.c:252: warning: nested extern declaration of ‘trace_pl011_put_fifo’
/tmp/qemu-test/src/hw/char/pl011.c:254: warning: implicit declaration of function ‘trace_pl011_put_fifo_full’
/tmp/qemu-test/src/hw/char/pl011.c:254: warning: nested extern declaration of ‘trace_pl011_put_fifo_full’
  CC      hw/mem/pc-dimm.o
  CC      hw/mem/nvdimm.o
  CC      hw/misc/applesmc.o
  CC      hw/misc/max111x.o
  CC      hw/misc/tmp105.o
  CC      hw/misc/debugexit.o
  CC      hw/misc/sga.o
  CC      hw/misc/pc-testdev.o
  CC      hw/misc/pci-testdev.o
  CC      hw/misc/arm_l2x0.o
  CC      hw/misc/arm_integrator_debug.o
  CC      hw/misc/a9scu.o
  CC      hw/misc/arm11scu.o
  CC      hw/net/ne2000.o
  CC      hw/net/eepro100.o
  CC      hw/net/pcnet.o
  CC      hw/net/pcnet-pci.o
  CC      hw/net/e1000.o
  CC      hw/net/e1000x_common.o
  CC      hw/net/net_tx_pkt.o
  CC      hw/net/net_rx_pkt.o
  CC      hw/net/e1000e.o
  CC      hw/net/e1000e_core.o
  CC      hw/net/rtl8139.o
  CC      hw/net/vmxnet3.o
  CC      hw/net/smc91c111.o
  CC      hw/net/lan9118.o
  CC      hw/net/ne2000-isa.o
  CC      hw/net/xgmac.o
  CC      hw/net/allwinner_emac.o
  CC      hw/net/imx_fec.o
  CC      hw/net/cadence_gem.o
  CC      hw/net/stellaris_enet.o
  CC      hw/net/rocker/rocker.o
  CC      hw/net/rocker/rocker_fp.o
  CC      hw/net/rocker/rocker_desc.o
  CC      hw/net/rocker/rocker_world.o
  CC      hw/net/rocker/rocker_of_dpa.o
  CC      hw/nvram/eeprom93xx.o
  CC      hw/nvram/chrp_nvram.o
  CC      hw/nvram/fw_cfg.o
  CC      hw/pci-bridge/pci_expander_bridge.o
  CC      hw/pci-bridge/pci_bridge_dev.o
  CC      hw/pci-bridge/xio3130_upstream.o
  CC      hw/pci-bridge/xio3130_downstream.o
  CC      hw/pci-bridge/ioh3420.o
  CC      hw/pci-bridge/i82801b11.o
  CC      hw/pci-host/pam.o
  CC      hw/pci-host/versatile.o
  CC      hw/pci-host/piix.o
  CC      hw/pci-host/q35.o
  CC      hw/pci-host/gpex.o
  CC      hw/pci/pci.o
  CC      hw/pci/pci_bridge.o
  CC      hw/pci/msix.o
  CC      hw/pci/msi.o
  CC      hw/pci/shpc.o
  CC      hw/pci/slotid_cap.o
  CC      hw/pci/pci_host.o
  CC      hw/pci/pcie_host.o
  CC      hw/pci/pcie.o
  CC      hw/pci/pcie_aer.o
  CC      hw/pci/pcie_port.o
  CC      hw/pci/pci-stub.o
  CC      hw/pcmcia/pcmcia.o
  CC      hw/scsi/scsi-disk.o
  CC      hw/scsi/scsi-generic.o
  CC      hw/scsi/scsi-bus.o
  CC      hw/scsi/lsi53c895a.o
  CC      hw/scsi/mptsas.o
  CC      hw/scsi/mptconfig.o
  CC      hw/scsi/mptendian.o
  CC      hw/scsi/megasas.o
  CC      hw/scsi/esp.o
  CC      hw/scsi/vmw_pvscsi.o
  CC      hw/scsi/esp-pci.o
  CC      hw/sd/pl181.o
  CC      hw/sd/ssi-sd.o
  CC      hw/sd/sd.o
  CC      hw/sd/core.o
  CC      hw/sd/sdhci.o
  CC      hw/smbios/smbios.o
  CC      hw/smbios/smbios_type_38.o
  CC      hw/ssi/pl022.o
  CC      hw/ssi/ssi.o
  CC      hw/ssi/xilinx_spips.o
  CC      hw/ssi/aspeed_smc.o
  CC      hw/ssi/stm32f2xx_spi.o
  CC      hw/timer/arm_timer.o
  CC      hw/timer/arm_mptimer.o
  CC      hw/timer/a9gtimer.o
  CC      hw/timer/cadence_ttc.o
  CC      hw/timer/ds1338.o
  CC      hw/timer/hpet.o
  CC      hw/timer/i8254_common.o
  CC      hw/timer/i8254.o
  CC      hw/timer/pl031.o
  CC      hw/timer/twl92230.o
  CC      hw/timer/imx_epit.o
  CC      hw/timer/imx_gpt.o
  CC      hw/timer/stm32f2xx_timer.o
  CC      hw/timer/aspeed_timer.o
  CC      hw/tpm/tpm_tis.o
  CC      hw/tpm/tpm_passthrough.o
  CC      hw/tpm/tpm_util.o
  CC      hw/usb/core.o
  CC      hw/usb/combined-packet.o
  CC      hw/usb/bus.o
  CC      hw/usb/libhw.o
/tmp/qemu-test/src/hw/nvram/fw_cfg.c: In function ‘fw_cfg_dma_transfer’:
/tmp/qemu-test/src/hw/nvram/fw_cfg.c:329: warning: ‘read’ may be used uninitialized in this function
  CC      hw/usb/desc.o
  CC      hw/usb/desc-msos.o
  CC      hw/usb/hcd-uhci.o
  CC      hw/usb/hcd-ohci.o
  CC      hw/usb/hcd-ehci.o
  CC      hw/usb/hcd-ehci-pci.o
  CC      hw/usb/hcd-ehci-sysbus.o
  CC      hw/usb/hcd-xhci.o
  CC      hw/usb/hcd-musb.o
  CC      hw/usb/dev-hub.o
  CC      hw/usb/dev-hid.o
  CC      hw/usb/dev-wacom.o
  CC      hw/usb/dev-storage.o
  CC      hw/usb/dev-uas.o
  CC      hw/usb/dev-serial.o
  CC      hw/usb/dev-audio.o
  CC      hw/usb/dev-network.o
  CC      hw/usb/dev-bluetooth.o
  CC      hw/usb/dev-smartcard-reader.o
  CC      hw/usb/dev-mtp.o
  CC      hw/usb/host-stub.o
  CC      hw/virtio/virtio-rng.o
  CC      hw/virtio/virtio-pci.o
  CC      hw/virtio/virtio-bus.o
  CC      hw/virtio/virtio-mmio.o
  CC      hw/watchdog/watchdog.o
  CC      hw/watchdog/wdt_i6300esb.o
  CC      hw/watchdog/wdt_ib700.o
  CC      migration/migration.o
  CC      migration/socket.o
  CC      migration/fd.o
  CC      migration/exec.o
  CC      migration/tls.o
  CC      migration/colo-comm.o
  CC      migration/colo.o
  CC      migration/colo-failover.o
  CC      migration/vmstate.o
  CC      migration/qemu-file.o
  CC      migration/qemu-file-channel.o
  CC      migration/xbzrle.o
  CC      migration/postcopy-ram.o
  CC      migration/qjson.o
  CC      migration/block.o
  CC      net/net.o
  CC      net/queue.o
  CC      net/checksum.o
  CC      net/util.o
  CC      net/socket.o
  CC      net/hub.o
  CC      net/eth.o
  CC      net/dump.o
  CC      net/l2tpv3.o
  CC      net/tap.o
  CC      net/vhost-user.o
  CC      net/tap-linux.o
/tmp/qemu-test/src/migration/colo.c: In function ‘colo_send_message’:
/tmp/qemu-test/src/migration/colo.c:123: warning: implicit declaration of function ‘trace_colo_send_message’
/tmp/qemu-test/src/migration/colo.c:123: warning: nested extern declaration of ‘trace_colo_send_message’
/tmp/qemu-test/src/migration/colo.c: In function ‘colo_receive_message’:
/tmp/qemu-test/src/migration/colo.c:162: warning: implicit declaration of function ‘trace_colo_receive_message’
/tmp/qemu-test/src/migration/colo.c:162: warning: nested extern declaration of ‘trace_colo_receive_message’
/tmp/qemu-test/src/migration/colo.c: In function ‘colo_do_checkpoint_transaction’:
/tmp/qemu-test/src/migration/colo.c:234: warning: implicit declaration of function ‘trace_colo_vm_state_change’
/tmp/qemu-test/src/migration/colo.c:234: warning: nested extern declaration of ‘trace_colo_vm_state_change’
  CC      net/slirp.o
  CC      net/filter.o
  CC      net/filter-buffer.o
  CC      net/filter-mirror.o
  CC      net/colo-compare.o
  CC      net/colo.o
  CC      net/filter-rewriter.o
  CC      net/filter-replay.o
  CC      qom/cpu.o
  CC      replay/replay.o
  CC      replay/replay-internal.o
  CC      replay/replay-events.o
/tmp/qemu-test/src/replay/replay-internal.c: In function ‘replay_put_array’:
/tmp/qemu-test/src/replay/replay-internal.c:65: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
  CC      replay/replay-time.o
  CC      replay/replay-input.o
  CC      replay/replay-char.o
  CC      replay/replay-snapshot.o
  CC      replay/replay-net.o
  CC      slirp/cksum.o
  CC      slirp/if.o
  CC      slirp/ip_icmp.o
/tmp/qemu-test/src/migration/colo-failover.c: In function ‘failover_set_state’:
/tmp/qemu-test/src/migration/colo-failover.c:65: warning: implicit declaration of function ‘trace_colo_failover_set_state’
/tmp/qemu-test/src/migration/colo-failover.c:65: warning: nested extern declaration of ‘trace_colo_failover_set_state’
  CC      slirp/ip6_icmp.o
  CC      slirp/ip6_input.o
  CC      slirp/ip6_output.o
  CC      slirp/ip_input.o
  CC      slirp/ip_output.o
  CC      slirp/dnssearch.o
  CC      slirp/dhcpv6.o
  CC      slirp/slirp.o
  CC      slirp/mbuf.o
  CC      slirp/misc.o
  CC      slirp/sbuf.o
  CC      slirp/socket.o
  CC      slirp/tcp_input.o
  CC      slirp/tcp_output.o
  CC      slirp/tcp_subr.o
  CC      slirp/tcp_timer.o
  CC      slirp/udp.o
  CC      slirp/udp6.o
/tmp/qemu-test/src/slirp/tcp_input.c: In function ‘tcp_input’:
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_p’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_len’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_tos’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_id’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_off’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_ttl’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_sum’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_src.s_addr’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_dst.s_addr’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:220: warning: ‘save_ip6.ip_nh’ may be used uninitialized in this function
  CC      slirp/bootp.o
  CC      slirp/tftp.o
  CC      slirp/arp_table.o
  CC      slirp/ndp_table.o
  CC      ui/keymaps.o
  CC      ui/console.o
  CC      ui/cursor.o
  CC      ui/qemu-pixman.o
  CC      ui/input.o
  CC      ui/input-keymap.o
  CC      ui/input-legacy.o
  CC      ui/input-linux.o
/tmp/qemu-test/src/net/colo.c: In function ‘parse_packet_early’:
/tmp/qemu-test/src/net/colo.c:51: warning: implicit declaration of function ‘trace_colo_proxy_main’
/tmp/qemu-test/src/net/colo.c:51: warning: nested extern declaration of ‘trace_colo_proxy_main’
  CC      ui/sdl.o
  CC      ui/sdl_zoom.o
  CC      ui/x_keymap.o
  CC      ui/vnc.o
  CC      ui/vnc-enc-zlib.o
  CC      ui/vnc-enc-hextile.o
  CC      ui/vnc-enc-tight.o
/tmp/qemu-test/src/net/colo-compare.c: In function ‘colo_packet_compare’:
/tmp/qemu-test/src/net/colo-compare.c:166: warning: implicit declaration of function ‘trace_colo_compare_ip_info’
/tmp/qemu-test/src/net/colo-compare.c:166: warning: nested extern declaration of ‘trace_colo_compare_ip_info’
/tmp/qemu-test/src/net/colo-compare.c: In function ‘colo_packet_compare_tcp’:
/tmp/qemu-test/src/net/colo-compare.c:188: warning: implicit declaration of function ‘trace_colo_compare_main’
/tmp/qemu-test/src/net/colo-compare.c:188: warning: nested extern declaration of ‘trace_colo_compare_main’
/tmp/qemu-test/src/net/colo-compare.c:190: error: ‘TRACE_COLO_COMPARE_MISCOMPARE_ENABLED’ undeclared (first use in this function)
/tmp/qemu-test/src/net/colo-compare.c:190: error: (Each undeclared identifier is reported only once
/tmp/qemu-test/src/net/colo-compare.c:190: error: for each function it appears in.)
/tmp/qemu-test/src/net/colo-compare.c:190: error: ‘_TRACE_COLO_COMPARE_MISCOMPARE_DSTATE’ undeclared (first use in this function)
/tmp/qemu-test/src/net/colo-compare.c:217: warning: implicit declaration of function ‘trace_colo_compare_pkt_info_src’
/tmp/qemu-test/src/net/colo-compare.c:217: warning: nested extern declaration of ‘trace_colo_compare_pkt_info_src’
/tmp/qemu-test/src/net/colo-compare.c:223: warning: implicit declaration of function ‘trace_colo_compare_pkt_info_dst’
/tmp/qemu-test/src/net/colo-compare.c:223: warning: nested extern declaration of ‘trace_colo_compare_pkt_info_dst’
/tmp/qemu-test/src/net/colo-compare.c: In function ‘colo_packet_compare_udp’:
/tmp/qemu-test/src/net/colo-compare.c:250: warning: implicit declaration of function ‘trace_colo_compare_udp_miscompare’
/tmp/qemu-test/src/net/colo-compare.c:250: warning: nested extern declaration of ‘trace_colo_compare_udp_miscompare’
/tmp/qemu-test/src/net/colo-compare.c: In function ‘colo_packet_compare_icmp’:
/tmp/qemu-test/src/net/colo-compare.c:275: warning: implicit declaration of function ‘trace_colo_compare_icmp_miscompare’
/tmp/qemu-test/src/net/colo-compare.c:275: warning: nested extern declaration of ‘trace_colo_compare_icmp_miscompare’
/tmp/qemu-test/src/net/colo-compare.c: In function ‘colo_old_packet_check_one’:
/tmp/qemu-test/src/net/colo-compare.c:308: warning: implicit declaration of function ‘trace_colo_old_packet_check_found’
/tmp/qemu-test/src/net/colo-compare.c:308: warning: nested extern declaration of ‘trace_colo_old_packet_check_found’
  CC      ui/vnc-palette.o
make: *** [net/colo-compare.o] Error 1
make: *** Waiting for unfinished jobs....
  CC      ui/vnc-enc-zrle.o
  CC      ui/vnc-auth-vencrypt.o
/tmp/qemu-test/src/net/filter-rewriter.c: In function ‘handle_primary_tcp_pkt’:
/tmp/qemu-test/src/net/filter-rewriter.c:70: error: ‘TRACE_COLO_FILTER_REWRITER_DEBUG_ENABLED’ undeclared (first use in this function)
/tmp/qemu-test/src/net/filter-rewriter.c:70: error: (Each undeclared identifier is reported only once
/tmp/qemu-test/src/net/filter-rewriter.c:70: error: for each function it appears in.)
/tmp/qemu-test/src/net/filter-rewriter.c:70: error: ‘_TRACE_COLO_FILTER_REWRITER_DEBUG_DSTATE’ undeclared (first use in this function)
/tmp/qemu-test/src/net/filter-rewriter.c:71: warning: implicit declaration of function ‘trace_colo_filter_rewriter_pkt_info’
/tmp/qemu-test/src/net/filter-rewriter.c:71: warning: nested extern declaration of ‘trace_colo_filter_rewriter_pkt_info’
/tmp/qemu-test/src/net/filter-rewriter.c:75: warning: implicit declaration of function ‘trace_colo_filter_rewriter_conn_offset’
/tmp/qemu-test/src/net/filter-rewriter.c:75: warning: nested extern declaration of ‘trace_colo_filter_rewriter_conn_offset’
/tmp/qemu-test/src/net/filter-rewriter.c: In function ‘handle_secondary_tcp_pkt’:
/tmp/qemu-test/src/net/filter-rewriter.c:114: error: ‘TRACE_COLO_FILTER_REWRITER_DEBUG_ENABLED’ undeclared (first use in this function)
/tmp/qemu-test/src/net/filter-rewriter.c:114: error: ‘_TRACE_COLO_FILTER_REWRITER_DEBUG_DSTATE’ undeclared (first use in this function)
make: *** [net/filter-rewriter.o] Error 1
/tmp/qemu-test/src/qom/cpu.c: In function ‘cpu_reset’:
/tmp/qemu-test/src/qom/cpu.c:250: warning: implicit declaration of function ‘trace_guest_cpu_reset’
/tmp/qemu-test/src/qom/cpu.c:250: warning: nested extern declaration of ‘trace_guest_cpu_reset’
make[1]: *** [docker-run] Error 2
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-x9xsss8m/src'
make: *** [docker-run-test-quick@centos6] Error 2
=== OUTPUT END ===

Test command exited with code: 2


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ directory to modular trace.h file
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ " Daniel P. Berrange
@ 2017-01-06 17:09   ` Lluís Vilanova
  2017-01-06 17:18     ` Daniel P. Berrange
  0 siblings, 1 reply; 83+ messages in thread
From: Lluís Vilanova @ 2017-01-06 17:09 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel, Stefan Hajnoczi

Daniel P Berrange writes:

> Switch files in the target/s390x/ directory to include the
> target/s390x/trace.h file instead of the global trace.h
> file.

> The make rules for gen-features.{h,c} need to be moved
> out into the top level Makefile.objs, otherwise make
> complains about the rules being defined multiple times
> due to target/s390x/Makefile.objs being included
> multiple times when expanding different subdir object
> lists.

If the problem is re-definition, you can instead add a guard around the rules in
target/s390x/Makefile.objs. This avoids defining the rules multiple times but
still keeps the target-specific rules in the target-specific makefile.


Cheers,
  Lluis

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ directory to modular trace.h file
  2017-01-06 17:09   ` Lluís Vilanova
@ 2017-01-06 17:18     ` Daniel P. Berrange
  2017-01-06 20:45       ` Lluís Vilanova
  0 siblings, 1 reply; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 17:18 UTC (permalink / raw)
  To: qemu-devel, Stefan Hajnoczi

On Fri, Jan 06, 2017 at 06:09:16PM +0100, Lluís Vilanova wrote:
> Daniel P Berrange writes:
> 
> > Switch files in the target/s390x/ directory to include the
> > target/s390x/trace.h file instead of the global trace.h
> > file.
> 
> > The make rules for gen-features.{h,c} need to be moved
> > out into the top level Makefile.objs, otherwise make
> > complains about the rules being defined multiple times
> > due to target/s390x/Makefile.objs being included
> > multiple times when expanding different subdir object
> > lists.
> 
> If the problem is re-definition, you can instead add a guard around the rules in
> target/s390x/Makefile.objs. This avoids defining the rules multiple times but
> still keeps the target-specific rules in the target-specific makefile.

What kind of guard to you mean ? What's happening is that the top
level Makefile.target is including target/s390x/Makefile.objs
multiple times to expand multiple vars. I don't see a way to
distinguish which include we're being called from.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 01/47] trace: introduce some Makefile rules for module code gen
  2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 01/47] trace: introduce some Makefile rules for module code gen Daniel P. Berrange
@ 2017-01-06 17:20   ` Lluís Vilanova
  2017-01-06 17:25     ` Daniel P. Berrange
  0 siblings, 1 reply; 83+ messages in thread
From: Lluís Vilanova @ 2017-01-06 17:20 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel, Stefan Hajnoczi

Daniel P Berrange writes:

> Introduce rules that are able to generate trace.[ch] files
> in every subdirectory which has a trace-events file.

> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  .gitignore                               |  6 +++
>  Makefile                                 | 65 +++++++++++++++++++++++++++-----
>  Makefile.objs                            |  5 +++
>  Makefile.target                          |  7 +++-
>  scripts/tracetool/backend/dtrace.py      |  7 +++-
>  scripts/tracetool/backend/ust.py         |  7 +++-
>  scripts/tracetool/format/ust_events_c.py |  2 +-
>  scripts/tracetool/format/ust_events_h.py |  7 +++-
>  tests/Makefile.include                   |  2 +-
>  trace/Makefile.objs                      | 23 ++++++++---
>  10 files changed, 109 insertions(+), 22 deletions(-)

> diff --git a/.gitignore b/.gitignore
> index e43c304..fe6add3 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -111,3 +111,9 @@ tags
>  TAGS
>  docker-src.*
>  *~
> +trace.h
> +trace.c
> +trace-events-common
> +trace-ust.h
> +trace-dtrace.h
> +trace-dtrace.dtrace
> diff --git a/Makefile b/Makefile
> index 214cbad..181802b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -70,11 +70,53 @@ GENERATED_SOURCES += trace/generated-helpers.c
 
>  ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust)
>  GENERATED_HEADERS += trace/generated-ust-provider.h
> +GENERATED_HEADERS += trace/generated-ust-provider-all.h
>  GENERATED_SOURCES += trace/generated-ust.c
>  endif
 
>  GENERATED_HEADERS += module_block.h
 
> +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace.h)
> +GENERATED_SOURCES += $(trace-events-subdirs:%=%/trace.c)
> +GENERATED_DTRACE =
> +ifdef CONFIG_TRACE_DTRACE
> +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-dtrace.h)
> +GENERATED_DTRACE += $(trace-events-subdirs:%=%/trace-dtrace.dtrace)
> +endif
> +ifdef CONFIG_TRACE_UST
> +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-ust.h)
> +endif
> +
> +%/trace.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
> +	$(call quiet-command,$(TRACETOOL) \
> +		--format=h \
> +		--backends=$(TRACE_BACKENDS) \
> +		$< > $@,"GEN","$@")
> +
> +%/trace.c: $(SRC_PATH)/%/trace-events $(tracetool-y)
> +	$(call quiet-command,$(TRACETOOL) \
> +		--format=c \
> +		--backends=$(TRACE_BACKENDS) \
> +		$< > $@,"GEN","$@")
> +
> +%/trace-ust.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
> +	$(call quiet-command,$(TRACETOOL) \
> +		--format=ust-events-h \
> +		--backends=$(TRACE_BACKENDS) \
> +		$< > $@,"GEN","$@")

There's a discrepancy between generation in trace/Makefile.objs, where timestamp
files are used to filter out internal changes in tracetool, and here.


[...]
> diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
> index 79505c6..1319990 100644
> --- a/scripts/tracetool/backend/dtrace.py
> +++ b/scripts/tracetool/backend/dtrace.py
> @@ -36,7 +36,12 @@ def binary():
 
 
>  def generate_h_begin(events, group):
> -    out('#include "trace/generated-tracers-dtrace.h"',
> +    if group == "common":
> +        include = "trace/generated-tracers-dtrace.h"
> +    else:
> +        include = "trace-dtrace.h"
> +
> +    out('#include "%s"' % include,
>          '')

Why is the top-level events file treated as a special case?


[...]


Cheers,
  Lluis

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file
  2017-01-06 17:02 ` no-reply
@ 2017-01-06 17:23   ` Daniel P. Berrange
  0 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 17:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: famz, stefanha

On Fri, Jan 06, 2017 at 09:02:42AM -0800, no-reply@patchew.org wrote:
> Hi,
> 
> Your series failed automatic build test. Please find the testing commands and
> their output below. If you have docker installed, you can probably reproduce it

[snip]

> /tmp/qemu-test/src/hw/char/pl011.c: In function ‘pl011_update’:
> /tmp/qemu-test/src/hw/char/pl011.c:62: warning: implicit declaration of function ‘trace_pl011_irq_state’
> /tmp/qemu-test/src/hw/char/pl011.c:62: warning: nested extern declaration of ‘trace_pl011_irq_state’
> /tmp/qemu-test/src/hw/char/pl011.c: In function ‘pl011_read’:
> /tmp/qemu-test/src/hw/char/pl011.c:87: warning: implicit declaration of function ‘trace_pl011_read_fifo’
> /tmp/qemu-test/src/hw/char/pl011.c:87: warning: nested extern declaration of ‘trace_pl011_read_fifo’
> /tmp/qemu-test/src/hw/char/pl011.c:139: warning: implicit declaration of function ‘trace_pl011_read’
> /tmp/qemu-test/src/hw/char/pl011.c:139: warning: nested extern declaration of ‘trace_pl011_read’
> /tmp/qemu-test/src/hw/char/pl011.c: In function ‘pl011_write’:
> /tmp/qemu-test/src/hw/char/pl011.c:163: warning: implicit declaration of function ‘trace_pl011_write’
> /tmp/qemu-test/src/hw/char/pl011.c:163: warning: nested extern declaration of ‘trace_pl011_write’
> /tmp/qemu-test/src/hw/char/pl011.c: In function ‘pl011_can_receive’:
> /tmp/qemu-test/src/hw/char/pl011.c:237: warning: implicit declaration of function ‘trace_pl011_can_receive’
> /tmp/qemu-test/src/hw/char/pl011.c:237: warning: nested extern declaration of ‘trace_pl011_can_receive’
> /tmp/qemu-test/src/hw/char/pl011.c: In function ‘pl011_put_fifo’:
> /tmp/qemu-test/src/hw/char/pl011.c:252: warning: implicit declaration of function ‘trace_pl011_put_fifo’
> /tmp/qemu-test/src/hw/char/pl011.c:252: warning: nested extern declaration of ‘trace_pl011_put_fifo’
> /tmp/qemu-test/src/hw/char/pl011.c:254: warning: implicit declaration of function ‘trace_pl011_put_fifo_full’
> /tmp/qemu-test/src/hw/char/pl011.c:254: warning: nested extern declaration of ‘trace_pl011_put_fifo_full’

Sigh, include search path ordering is different when doing in-tree vs
out of tree builds.

When in-tree, the headers in the hw/char sub-dir are found *before*
the top level source dir.

When out of tree, the headers hw/char *build* dir are found *after*
the top level source dir.

Will have to investigate how we can fix the include ordering.

This is also a sign that travis.yml should do at least one of its
builds  with srcdir != build dir

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 01/47] trace: introduce some Makefile rules for module code gen
  2017-01-06 17:20   ` Lluís Vilanova
@ 2017-01-06 17:25     ` Daniel P. Berrange
  2017-01-06 20:53       ` Lluís Vilanova
  0 siblings, 1 reply; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-06 17:25 UTC (permalink / raw)
  To: qemu-devel, Stefan Hajnoczi

On Fri, Jan 06, 2017 at 06:20:51PM +0100, Lluís Vilanova wrote:
> Daniel P Berrange writes:
> 
> > Introduce rules that are able to generate trace.[ch] files
> > in every subdirectory which has a trace-events file.
> 
> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> > ---
> >  .gitignore                               |  6 +++
> >  Makefile                                 | 65 +++++++++++++++++++++++++++-----
> >  Makefile.objs                            |  5 +++
> >  Makefile.target                          |  7 +++-
> >  scripts/tracetool/backend/dtrace.py      |  7 +++-
> >  scripts/tracetool/backend/ust.py         |  7 +++-
> >  scripts/tracetool/format/ust_events_c.py |  2 +-
> >  scripts/tracetool/format/ust_events_h.py |  7 +++-
> >  tests/Makefile.include                   |  2 +-
> >  trace/Makefile.objs                      | 23 ++++++++---
> >  10 files changed, 109 insertions(+), 22 deletions(-)
> 
> > diff --git a/.gitignore b/.gitignore
> > index e43c304..fe6add3 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -111,3 +111,9 @@ tags
> >  TAGS
> >  docker-src.*
> >  *~
> > +trace.h
> > +trace.c
> > +trace-events-common
> > +trace-ust.h
> > +trace-dtrace.h
> > +trace-dtrace.dtrace
> > diff --git a/Makefile b/Makefile
> > index 214cbad..181802b 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -70,11 +70,53 @@ GENERATED_SOURCES += trace/generated-helpers.c
>  
> >  ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust)
> >  GENERATED_HEADERS += trace/generated-ust-provider.h
> > +GENERATED_HEADERS += trace/generated-ust-provider-all.h
> >  GENERATED_SOURCES += trace/generated-ust.c
> >  endif
>  
> >  GENERATED_HEADERS += module_block.h
>  
> > +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace.h)
> > +GENERATED_SOURCES += $(trace-events-subdirs:%=%/trace.c)
> > +GENERATED_DTRACE =
> > +ifdef CONFIG_TRACE_DTRACE
> > +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-dtrace.h)
> > +GENERATED_DTRACE += $(trace-events-subdirs:%=%/trace-dtrace.dtrace)
> > +endif
> > +ifdef CONFIG_TRACE_UST
> > +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-ust.h)
> > +endif
> > +
> > +%/trace.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
> > +	$(call quiet-command,$(TRACETOOL) \
> > +		--format=h \
> > +		--backends=$(TRACE_BACKENDS) \
> > +		$< > $@,"GEN","$@")
> > +
> > +%/trace.c: $(SRC_PATH)/%/trace-events $(tracetool-y)
> > +	$(call quiet-command,$(TRACETOOL) \
> > +		--format=c \
> > +		--backends=$(TRACE_BACKENDS) \
> > +		$< > $@,"GEN","$@")
> > +
> > +%/trace-ust.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
> > +	$(call quiet-command,$(TRACETOOL) \
> > +		--format=ust-events-h \
> > +		--backends=$(TRACE_BACKENDS) \
> > +		$< > $@,"GEN","$@")
> 
> There's a discrepancy between generation in trace/Makefile.objs, where timestamp
> files are used to filter out internal changes in tracetool, and here.

I took the view that the timestamp comparisons are an uneccessary
complexity - we don't do that for other places where we generate
code from scripts.

> > diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
> > index 79505c6..1319990 100644
> > --- a/scripts/tracetool/backend/dtrace.py
> > +++ b/scripts/tracetool/backend/dtrace.py
> > @@ -36,7 +36,12 @@ def binary():
>  
>  
> >  def generate_h_begin(events, group):
> > -    out('#include "trace/generated-tracers-dtrace.h"',
> > +    if group == "common":
> > +        include = "trace/generated-tracers-dtrace.h"
> > +    else:
> > +        include = "trace-dtrace.h"
> > +
> > +    out('#include "%s"' % include,
> >          '')
> 
> Why is the top-level events file treated as a special case?

This is temporary until the end of the series when the special
cases go away


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 46/47] trace: update docs to reflect new code generation approach
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 46/47] trace: update docs to reflect new code generation approach Daniel P. Berrange
@ 2017-01-06 17:26   ` Lluís Vilanova
  2017-01-06 18:13   ` Eric Blake
  1 sibling, 0 replies; 83+ messages in thread
From: Lluís Vilanova @ 2017-01-06 17:26 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel, Stefan Hajnoczi

Daniel P Berrange writes:

> Describe use of per-subdir trace events files and how it impacts
> code generation.

> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  docs/tracing.txt | 61 +++++++++++++++++++++++++++++++++++++++++++++++---------
>  1 file changed, 52 insertions(+), 9 deletions(-)

> diff --git a/docs/tracing.txt b/docs/tracing.txt
> index f351998a..3262a61 100644
> --- a/docs/tracing.txt
> +++ b/docs/tracing.txt
> @@ -27,18 +27,51 @@ for debugging, profiling, and observing execution.
 
>  == Trace events ==
 
> +=== Sub-directory setup ===
> +
>  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 "trace-events" file. The first (non-comment) statement in the file
> +must be "@id_offset(NN)" where NN is an integer that is unique among all
> +"trace-events" files in the QEMU source tree. The IDs can be arbitrarily
> +chosen, but for extra fun the current "trace-events" files use values from
> +the "powerful number" integer sequence :-)

I think that the description of @id_offset is a leftover from a previous version
of the series.


Cheers,
  Lluis

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 46/47] trace: update docs to reflect new code generation approach
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 46/47] trace: update docs to reflect new code generation approach Daniel P. Berrange
  2017-01-06 17:26   ` Lluís Vilanova
@ 2017-01-06 18:13   ` Eric Blake
  1 sibling, 0 replies; 83+ messages in thread
From: Eric Blake @ 2017-01-06 18:13 UTC (permalink / raw)
  To: Daniel P. Berrange, qemu-devel; +Cc: Stefan Hajnoczi

[-- Attachment #1: Type: text/plain, Size: 2790 bytes --]

On 01/06/2017 09:55 AM, Daniel P. Berrange wrote:
> Describe use of per-subdir trace events files and how it impacts
> code generation.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  docs/tracing.txt | 61 +++++++++++++++++++++++++++++++++++++++++++++++---------
>  1 file changed, 52 insertions(+), 9 deletions(-)
> 
> diff --git a/docs/tracing.txt b/docs/tracing.txt
> index f351998a..3262a61 100644
> --- a/docs/tracing.txt
> +++ b/docs/tracing.txt
> @@ -27,18 +27,51 @@ for debugging, profiling, and observing execution.
>  
>  == Trace events ==
>  
> +=== Sub-directory setup ===
> +
>  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 "trace-events" file. The first (non-comment) statement in the file
> +must be "@id_offset(NN)" where NN is an integer that is unique among all
> +"trace-events" files in the QEMU source tree. The IDs can be arbitrarily
> +chosen, but for extra fun the current "trace-events" files use values from
> +the "powerful number" integer sequence :-)

Is this true? I don't see an @id_offset() comment in any of your earlier
patches, or in the unpatched tree.


> +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 speci

s/speci/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 only #include the 'trace.h'
> +file and use the full sub-directory path. eg io/channel-buffer.c
> +would do
>  
> -All "trace-events" files must be listed in the "trace-event-y" make variable
> -in the top level Makefile.objs. During build the individual files are combined
> -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".
> +  #include "io/trace.h"
> +
> +While it is permited to include a trace.h file from outside a source

s/permited/permitted/

> +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.
> +
> +=== Using trace events ===
>  

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 47/47] trace: improve error reporting when parsing simpletrace header
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 47/47] trace: improve error reporting when parsing simpletrace header Daniel P. Berrange
@ 2017-01-06 18:15   ` Eric Blake
  2017-01-10 16:40   ` Stefan Hajnoczi
  1 sibling, 0 replies; 83+ messages in thread
From: Eric Blake @ 2017-01-06 18:15 UTC (permalink / raw)
  To: Daniel P. Berrange, qemu-devel; +Cc: Stefan Hajnoczi

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

On 01/06/2017 09:55 AM, Daniel P. Berrange wrote:
> 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.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  scripts/simpletrace.py | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 

Could be applied independently, so:

Reviewed-by: Eric Blake <eblake@redhat.com>

I'll leave a review of the Makefile magic in 1/47 to someone more
comfortable with it, but if that gets approved, you are right that most
of this series is pretty boring and mechanical.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ directory to modular trace.h file
  2017-01-06 17:18     ` Daniel P. Berrange
@ 2017-01-06 20:45       ` Lluís Vilanova
  0 siblings, 0 replies; 83+ messages in thread
From: Lluís Vilanova @ 2017-01-06 20:45 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel, Stefan Hajnoczi

Daniel P Berrange writes:

> On Fri, Jan 06, 2017 at 06:09:16PM +0100, Lluís Vilanova wrote:
>> Daniel P Berrange writes:
>> 
>> > Switch files in the target/s390x/ directory to include the
>> > target/s390x/trace.h file instead of the global trace.h
>> > file.
>> 
>> > The make rules for gen-features.{h,c} need to be moved
>> > out into the top level Makefile.objs, otherwise make
>> > complains about the rules being defined multiple times
>> > due to target/s390x/Makefile.objs being included
>> > multiple times when expanding different subdir object
>> > lists.
>> 
>> If the problem is re-definition, you can instead add a guard around the rules in
>> target/s390x/Makefile.objs. This avoids defining the rules multiple times but
>> still keeps the target-specific rules in the target-specific makefile.

> What kind of guard to you mean ? What's happening is that the top
> level Makefile.target is including target/s390x/Makefile.objs
> multiple times to expand multiple vars. I don't see a way to
> distinguish which include we're being called from.

I think I did something like this to ensure rules are defined only once:

  ifneq($(TRACE_GUARD_TARGET_S390X),1)
  # ... rules ...
  TRACE_GUARD_TARGET_S390X=1
  endif

It's not the cleanest solution, but neither is having target-specific rules in a
generic makefile. Choose your least evil.


Cheers,
  Lluis

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 01/47] trace: introduce some Makefile rules for module code gen
  2017-01-06 17:25     ` Daniel P. Berrange
@ 2017-01-06 20:53       ` Lluís Vilanova
  0 siblings, 0 replies; 83+ messages in thread
From: Lluís Vilanova @ 2017-01-06 20:53 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel, Stefan Hajnoczi

Daniel P Berrange writes:

> On Fri, Jan 06, 2017 at 06:20:51PM +0100, Lluís Vilanova wrote:
>> Daniel P Berrange writes:
>> 
>> > Introduce rules that are able to generate trace.[ch] files
>> > in every subdirectory which has a trace-events file.
>> 
>> > Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
>> > ---
>> >  .gitignore                               |  6 +++
>> >  Makefile                                 | 65 +++++++++++++++++++++++++++-----
>> >  Makefile.objs                            |  5 +++
>> >  Makefile.target                          |  7 +++-
>> >  scripts/tracetool/backend/dtrace.py      |  7 +++-
>> >  scripts/tracetool/backend/ust.py         |  7 +++-
>> >  scripts/tracetool/format/ust_events_c.py |  2 +-
>> >  scripts/tracetool/format/ust_events_h.py |  7 +++-
>> >  tests/Makefile.include                   |  2 +-
>> >  trace/Makefile.objs                      | 23 ++++++++---
>> >  10 files changed, 109 insertions(+), 22 deletions(-)
>> 
>> > diff --git a/.gitignore b/.gitignore
>> > index e43c304..fe6add3 100644
>> > --- a/.gitignore
>> > +++ b/.gitignore
>> > @@ -111,3 +111,9 @@ tags
>> >  TAGS
>> >  docker-src.*
>> >  *~
>> > +trace.h
>> > +trace.c
>> > +trace-events-common
>> > +trace-ust.h
>> > +trace-dtrace.h
>> > +trace-dtrace.dtrace
>> > diff --git a/Makefile b/Makefile
>> > index 214cbad..181802b 100644
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -70,11 +70,53 @@ GENERATED_SOURCES += trace/generated-helpers.c
>> 
>> >  ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust)
>> >  GENERATED_HEADERS += trace/generated-ust-provider.h
>> > +GENERATED_HEADERS += trace/generated-ust-provider-all.h
>> >  GENERATED_SOURCES += trace/generated-ust.c
>> >  endif
>> 
>> >  GENERATED_HEADERS += module_block.h
>> 
>> > +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace.h)
>> > +GENERATED_SOURCES += $(trace-events-subdirs:%=%/trace.c)
>> > +GENERATED_DTRACE =
>> > +ifdef CONFIG_TRACE_DTRACE
>> > +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-dtrace.h)
>> > +GENERATED_DTRACE += $(trace-events-subdirs:%=%/trace-dtrace.dtrace)
>> > +endif
>> > +ifdef CONFIG_TRACE_UST
>> > +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-ust.h)
>> > +endif
>> > +
>> > +%/trace.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
>> > +	$(call quiet-command,$(TRACETOOL) \
>> > +		--format=h \
>> > +		--backends=$(TRACE_BACKENDS) \
>> > +		$< > $@,"GEN","$@")
>> > +
>> > +%/trace.c: $(SRC_PATH)/%/trace-events $(tracetool-y)
>> > +	$(call quiet-command,$(TRACETOOL) \
>> > +		--format=c \
>> > +		--backends=$(TRACE_BACKENDS) \
>> > +		$< > $@,"GEN","$@")
>> > +
>> > +%/trace-ust.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
>> > +	$(call quiet-command,$(TRACETOOL) \
>> > +		--format=ust-events-h \
>> > +		--backends=$(TRACE_BACKENDS) \
>> > +		$< > $@,"GEN","$@")
>> 
>> There's a discrepancy between generation in trace/Makefile.objs, where timestamp
>> files are used to filter out internal changes in tracetool, and here.

> I took the view that the timestamp comparisons are an uneccessary
> complexity - we don't do that for other places where we generate
> code from scripts.

AFAIR, the idea was to avoid re-building all QEMU when any of the tracetool
script files change without affecting all the generated files.


>> > diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
>> > index 79505c6..1319990 100644
>> > --- a/scripts/tracetool/backend/dtrace.py
>> > +++ b/scripts/tracetool/backend/dtrace.py
>> > @@ -36,7 +36,12 @@ def binary():
>> 
>> 
>> >  def generate_h_begin(events, group):
>> > -    out('#include "trace/generated-tracers-dtrace.h"',
>> > +    if group == "common":
>> > +        include = "trace/generated-tracers-dtrace.h"
>> > +    else:
>> > +        include = "trace-dtrace.h"
>> > +
>> > +    out('#include "%s"' % include,
>> >          '')
>> 
>> Why is the top-level events file treated as a special case?

> This is temporary until the end of the series when the special
> cases go away

Yes, I saw you removed this special-casing (except in one case) in a later
patch. Sorry about that.


Thanks,
  Lluis

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file Daniel P. Berrange
@ 2017-01-10 16:37   ` Stefan Hajnoczi
  2017-01-10 16:51     ` Daniel P. Berrange
  2017-01-10 16:51     ` Eric Blake
  2017-01-10 16:38   ` Stefan Hajnoczi
  1 sibling, 2 replies; 83+ messages in thread
From: Stefan Hajnoczi @ 2017-01-10 16:37 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
> diff --git a/io/channel-buffer.c b/io/channel-buffer.c
> index 43d7959..b4e50d6 100644
> --- a/io/channel-buffer.c
> +++ b/io/channel-buffer.c
> @@ -22,7 +22,7 @@
>  #include "io/channel-buffer.h"
>  #include "io/channel-watch.h"
>  #include "qemu/sockets.h"
> -#include "trace.h"
> +#include "io/trace.h"

Is this change necessary?

I think the per-subdir trace.h file should be generated in
$BUILD_DIR/<sub-dir>/trace.h and gcc -I. can locate that file.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file Daniel P. Berrange
  2017-01-10 16:37   ` Stefan Hajnoczi
@ 2017-01-10 16:38   ` Stefan Hajnoczi
  2017-01-11 17:17     ` Daniel P. Berrange
  1 sibling, 1 reply; 83+ messages in thread
From: Stefan Hajnoczi @ 2017-01-10 16:38 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
> diff --git a/io/Makefile.objs b/io/Makefile.objs
> index 9d8337d..94cb74e 100644
> --- a/io/Makefile.objs
> +++ b/io/Makefile.objs
> @@ -8,3 +8,5 @@ io-obj-y += channel-watch.o
>  io-obj-y += channel-websock.o
>  io-obj-y += channel-util.o
>  io-obj-y += task.o
> +trace-obj-y += trace.o
> +trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o

Is there a way to eliminate this boilerplate?  If the directory has a
trace-events file then it requires trace.o/trace-dtrace.o.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 47/47] trace: improve error reporting when parsing simpletrace header
  2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 47/47] trace: improve error reporting when parsing simpletrace header Daniel P. Berrange
  2017-01-06 18:15   ` Eric Blake
@ 2017-01-10 16:40   ` Stefan Hajnoczi
  1 sibling, 0 replies; 83+ messages in thread
From: Stefan Hajnoczi @ 2017-01-10 16:40 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

On Fri, Jan 06, 2017 at 03:55:43PM +0000, Daniel P. Berrange wrote:
> 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.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  scripts/simpletrace.py | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-10 16:37   ` Stefan Hajnoczi
@ 2017-01-10 16:51     ` Daniel P. Berrange
  2017-01-10 17:45       ` Paolo Bonzini
  2017-01-10 16:51     ` Eric Blake
  1 sibling, 1 reply; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-10 16:51 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel

On Tue, Jan 10, 2017 at 04:37:13PM +0000, Stefan Hajnoczi wrote:
> On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
> > diff --git a/io/channel-buffer.c b/io/channel-buffer.c
> > index 43d7959..b4e50d6 100644
> > --- a/io/channel-buffer.c
> > +++ b/io/channel-buffer.c
> > @@ -22,7 +22,7 @@
> >  #include "io/channel-buffer.h"
> >  #include "io/channel-watch.h"
> >  #include "qemu/sockets.h"
> > -#include "trace.h"
> > +#include "io/trace.h"
> 
> Is this change necessary?
> 
> I think the per-subdir trace.h file should be generated in
> $BUILD_DIR/<sub-dir>/trace.h and gcc -I. can locate that file.

It doesn't work with builddir != srcdir builds, because -I. is resolved
to the srcdir, but the trace.h is in builddir. The -I$BUILDDIR<sub-dir>
is also added to the compiler search path, but it is after pretty much
all other search paths. The end result is that if you simply use
"trace.h" instad of "io/trace.h" you'll end up finding the trace.h
from the top level source directory, instead of from your subdir.

I think the include path should probably be changed such that the
-IBUILDDIR/<subdir> is immediately after -I., and I tried to make
such a change, but failed to come up with a simple patch that worked.

In the end I thought it would be clearer to be explicit about the
subdir we're pulling trace.h from anyway, since it is fairly common
practice  in QEMU to have the <subdir> in the #include filename.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-10 16:37   ` Stefan Hajnoczi
  2017-01-10 16:51     ` Daniel P. Berrange
@ 2017-01-10 16:51     ` Eric Blake
  2017-01-10 17:47       ` Paolo Bonzini
  2017-01-11 17:12       ` Stefan Hajnoczi
  1 sibling, 2 replies; 83+ messages in thread
From: Eric Blake @ 2017-01-10 16:51 UTC (permalink / raw)
  To: Stefan Hajnoczi, Daniel P. Berrange; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

On 01/10/2017 10:37 AM, Stefan Hajnoczi wrote:
> On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
>> diff --git a/io/channel-buffer.c b/io/channel-buffer.c
>> index 43d7959..b4e50d6 100644
>> --- a/io/channel-buffer.c
>> +++ b/io/channel-buffer.c
>> @@ -22,7 +22,7 @@
>>  #include "io/channel-buffer.h"
>>  #include "io/channel-watch.h"
>>  #include "qemu/sockets.h"
>> -#include "trace.h"
>> +#include "io/trace.h"
> 
> Is this change necessary?

Yes - now that there are more than one trace.h files spread across
multiple directories, you need a prefix to ensure the correct one gets
included.  In this particular case, it also matches consistency in
including "io/channel-buffer.h" rather than just "channel-buffer.h".

> 
> I think the per-subdir trace.h file should be generated in
> $BUILD_DIR/<sub-dir>/trace.h and gcc -I. can locate that file.

It can indeed locate it, but now you are depending on -I ordering to
make sure it locates the right one before any other wrong one, which
feels too fragile to me.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-10 16:51     ` Daniel P. Berrange
@ 2017-01-10 17:45       ` Paolo Bonzini
  2017-01-10 18:36         ` Daniel P. Berrange
  0 siblings, 1 reply; 83+ messages in thread
From: Paolo Bonzini @ 2017-01-10 17:45 UTC (permalink / raw)
  To: Daniel P. Berrange, Stefan Hajnoczi; +Cc: qemu-devel



On 10/01/2017 17:51, Daniel P. Berrange wrote:
> It doesn't work with builddir != srcdir builds, because -I. is resolved
> to the srcdir, but the trace.h is in builddir.

This is a bug then.  The toplevel builddir (or for that matter srcdir)
is not meant to be in the search path: only the toplevel include/, the
subdirectory builddir, and the subdirectory srcdir.

> In the end I thought it would be clearer to be explicit about the
> subdir we're pulling trace.h from anyway, since it is fairly common
> practice  in QEMU to have the <subdir> in the #include filename.

Hmm, I don't think so.  The idea is that all includes are nested, so
that a local directory #include has no subdir while one from #include/
has one.

Paolo

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-10 16:51     ` Eric Blake
@ 2017-01-10 17:47       ` Paolo Bonzini
  2017-01-11 17:12       ` Stefan Hajnoczi
  1 sibling, 0 replies; 83+ messages in thread
From: Paolo Bonzini @ 2017-01-10 17:47 UTC (permalink / raw)
  To: Eric Blake, Stefan Hajnoczi, Daniel P. Berrange; +Cc: qemu-devel



On 10/01/2017 17:51, Eric Blake wrote:
> On 01/10/2017 10:37 AM, Stefan Hajnoczi wrote:
>> On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
>>> diff --git a/io/channel-buffer.c b/io/channel-buffer.c
>>> index 43d7959..b4e50d6 100644
>>> --- a/io/channel-buffer.c
>>> +++ b/io/channel-buffer.c
>>> @@ -22,7 +22,7 @@
>>>  #include "io/channel-buffer.h"
>>>  #include "io/channel-watch.h"
>>>  #include "qemu/sockets.h"
>>> -#include "trace.h"
>>> +#include "io/trace.h"
>>
>> Is this change necessary?
> 
> Yes - now that there are more than one trace.h files spread across
> multiple directories, you need a prefix to ensure the correct one gets
> included.  In this particular case, it also matches consistency in
> including "io/channel-buffer.h" rather than just "channel-buffer.h".
> 
>>
>> I think the per-subdir trace.h file should be generated in
>> $BUILD_DIR/<sub-dir>/trace.h and gcc -I. can locate that file.
> 
> It can indeed locate it, but now you are depending on -I ordering to
> make sure it locates the right one before any other wrong one, which
> feels too fragile to me.

The wrong one shouldn't be available at all.  io/channel-buffer.h is in
include/io/, while io/trace.h is in io/.  But I guess this can be
cleaned up through the whole tree later if Stefan wants to merge this
more disrupting series soon.

Paolo

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-10 17:45       ` Paolo Bonzini
@ 2017-01-10 18:36         ` Daniel P. Berrange
  2017-01-10 21:01           ` Paolo Bonzini
  0 siblings, 1 reply; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-10 18:36 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Stefan Hajnoczi, qemu-devel

On Tue, Jan 10, 2017 at 06:45:23PM +0100, Paolo Bonzini wrote:
> 
> 
> On 10/01/2017 17:51, Daniel P. Berrange wrote:
> > It doesn't work with builddir != srcdir builds, because -I. is resolved
> > to the srcdir, but the trace.h is in builddir.
> 
> This is a bug then.  The toplevel builddir (or for that matter srcdir)
> is not meant to be in the search path: only the toplevel include/, the
> subdirectory builddir, and the subdirectory srcdir.

So what's happening is this...

During build of, for example, hw/scsi/esp-pci.o we have this
explicit include search path passed to GCC:

-I/home/berrange/src/virt/qemu/tcg
-I/home/berrange/src/virt/qemu/tcg/i386
-I/home/berrange/src/virt/qemu/linux-headers
-I/home/berrange/src/virt/qemu-build/linux-headers
-I.
-I/home/berrange/src/virt/qemu
-I/home/berrange/src/virt/qemu/include
-I/home/berrange/src/virt/qemu/hw/scsi
-Ihw/scsi

Here -I. refers to the $BUILDDIR, since although the source file is in
hw/scsi/, the compiler is invoked from $BUILDDIR as its working directory. 

The compiler also has an implicit search dir which is the directory where
the source file being compiled lives, and that is searched first AFAICT.

So when doing non-vpath build:

   srcdir=/home/berrange/src/virt/qemu
 builddir=/home/berrange/src/virt/qemu

we have this effective search order:

-I/home/berrange/src/virt/qemu/hw/scsi
-I/home/berrange/src/virt/qemu/tcg
-I/home/berrange/src/virt/qemu/tcg/i386
-I/home/berrange/src/virt/qemu/linux-headers
-I/home/berrange/src/virt/qemu/linux-headers
-I/home/berrange/src/virt/qemu
-I/home/berrange/src/virt/qemu
-I/home/berrange/src/virt/qemu/include
-I/home/berrange/src/virt/qemu/hw/scsi
-I/home/berrange/src/virt/qemu/hw/scsi


Thus, #include "trace.h" picks up $builddir/hw/scsi/trace.h correctly.

5782  execve("/usr/bin/as", ["as", "-I", "/home/berrange/src/virt/qemu/tcg", "-I", "/home/berrange/src/virt/qemu/tcg/i386", "-I", "/home/berrange/src/virt/qemu/linux-headers", "-I", "/home/berrange/src/virt/qemu/linux-headers", "-I", ".", "-I", "/home/berrange/src/virt/qemu", "-I", "/home/berrange/src/virt/qemu/include", "-I", "hw/scsi", "-I", "hw/scsi", "-I", "/usr/include/pixman-1", "-I", "/usr/include/glib-2.0", "-I", "/usr/lib64/glib-2.0/include", "-I", "/usr/include/p11-kit-1", "-I", "/usr/include/libpng16", "-I", "/usr/include/spice-server", "-I", "/usr/include/cacard", "-I", "/usr/include/nss3", "-I", "/usr/include/nspr4", "-I", "/usr/include/glib-2.0", "-I", "/usr/lib64/glib-2.0/include", "-I", "/usr/include/pixman-1", "-I", "/usr/include/spice-1", "-I", "/usr/include/cacard", "-I", "/usr/include/nss3", "-I", "/usr/include/nspr4", "-I", "/usr/include/glib-2.0", "-I", "/usr/lib64/glib-2.0/include", "-I", "/usr/include/libusb-1.0", "-I", "/home/berrange/src/virt/qemu/tests", "--64", "-o", "hw/scsi/esp-pci.o", "/tmp/cccr6Zf8.s"], [/* 63 vars */] <unfinished ...>

...

5781  open("hw/scsi/trace.h", O_RDONLY|O_NOCTTY) = 14


but when doing a vpath build

   srcdir=/home/berrange/src/virt/qemu
 builddir=/home/berrange/src/virt/qemu-build

we have this effective search order:


-I/home/berrange/src/virt/qemu/hw/scsi
-I/home/berrange/src/virt/qemu/tcg
-I/home/berrange/src/virt/qemu/tcg/i386
-I/home/berrange/src/virt/qemu/linux-headers
-I/home/berrange/src/virt/qemu-build/linux-headers
-I/home/berrange/src/virt/qemu-build
-I/home/berrange/src/virt/qemu
-I/home/berrange/src/virt/qemu/include
-I/home/berrange/src/virt/qemu/hw/scsi
-I/home/berrange/src/virt/qemu-build/hw/scsi

Thus #include "trace.h" picks up $builddir/trace.h incorrectly.

3138  execve("/usr/libexec/gcc/x86_64-redhat-linux/6.2.1/cc1", ["/usr/libexec/gcc/x86_64-redhat-linux/6.2.1/cc1", "-quiet", "-I", "/home/berrange/src/virt/qemu/tcg", "-I", "/home/berrange/src/virt/qemu/tcg/i386", "-I", "/home/berrange/src/virt/qemu/linux-headers", "-I", "/home/berrange/src/virt/qemu-build/linux-headers", "-I", ".", "-I", "/home/berrange/src/virt/qemu", "-I", "/home/berrange/src/virt/qemu/include", "-I", "/home/berrange/src/virt/qemu/hw/scsi", "-I", "hw/scsi", "-I", "/usr/include/pixman-1", "-I", "/usr/include/glib-2.0", "-I", "/usr/lib64/glib-2.0/include", "-I", "/usr/include/p11-kit-1", "-I", "/usr/include/libpng16", "-I", "/usr/include/spice-server", "-I", "/usr/include/cacard", "-I", "/usr/include/nss3", "-I", "/usr/include/nspr4", "-I", "/usr/include/glib-2.0", "-I", "/usr/lib64/glib-2.0/include", "-I", "/usr/include/pixman-1", "-I", "/usr/include/spice-1", "-I", "/usr/include/cacard", "-I", "/usr/include/nss3", "-I", "/usr/include/nspr4", "-I", "/usr/include/glib-2.0", "-I", "/usr/lib64/glib-2.0/include", "-I", "/usr/include/libusb-1.0", "-I", "/home/berrange/src/virt/qemu/tests", "-MMD", "hw/scsi/esp-pci.d", "-MF", "hw/scsi/esp-pci.d", "-MP", "-MT", "hw/scsi/esp-pci.o", "-D_REENTRANT", "-D", "HAS_LIBSSH2_SFTP_FSYNC", "-D", "_GNU_SOURCE", "-D", "PIE", "-D", "_GNU_SOURCE", "-D", "_FILE_OFFSET_BITS=64", "-D", "_LARGEFILE_SOURCE", "-U", "_FORTIFY_SOURCE", "-D", "_FORTIFY_SOURCE=2", "/home/berrange/src/virt/qemu/hw/scsi/esp-pci.c", "-quiet", "-dumpbase", "esp-pci.c", "-m64", "-mcx16", "-mtune=generic", "-march=x86-64", "-auxbase-strip", "hw/scsi/esp-pci.o", "-g", "-O2", "-Werror", "-Wstrict-prototypes", "-Wredundant-decls", "-Wall", "-Wundef", "-Wwrite-strings", "-Wmissing-prototypes", "-Wendif-labels", "-Wno-shift-negative-value", "-Wmissing-include-dirs", "-Wempty-body", "-Wnested-externs", "-Wformat-security", "-Wformat-y2k", "-Winit-self", "-Wignored-qualifiers", "-Wold-style-declaration", "-Wold-style-definition", "-Wtype-limits", "-fPIE", "-fno-strict-aliasing", "-fno-common", "-fwrapv", "-fstack-protector-strong", "-o", "/tmp/ccH7yXaj.s"], [/* 63 vars */] <unfinished ...>

...

3138  open("/home/berrange/src/virt/qemu/hw/scsi/trace.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
3138  open("/home/berrange/src/virt/qemu/tcg/trace.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
3138  open("/home/berrange/src/virt/qemu/tcg/i386/trace.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
3138  open("/home/berrange/src/virt/qemu/linux-headers/trace.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
3138  open("/home/berrange/src/virt/qemu-build/linux-headers/trace.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
3138  open("./trace.h", O_RDONLY|O_NOCTTY) = 14
3138  open("./trace.h", O_RDONLY)       = 14


For a consistent search order, we would need to have this be the
explicit args:

-I/home/berrange/src/virt/qemu/hw/scsi
-Ihw/scsi
-I/home/berrange/src/virt/qemu/tcg
-I/home/berrange/src/virt/qemu/tcg/i386
-I/home/berrange/src/virt/qemu/linux-headers
-I/home/berrange/src/virt/qemu-build/linux-headers
-I.
-I/home/berrange/src/virt/qemu
-I/home/berrange/src/virt/qemu/include

It seems you're saying we should also trim the top level dirs, so
we in fact get:


-I/home/berrange/src/virt/qemu/hw/scsi
-Ihw/scsi
-I/home/berrange/src/virt/qemu/tcg
-I/home/berrange/src/virt/qemu/tcg/i386
-I/home/berrange/src/virt/qemu/linux-headers
-I/home/berrange/src/virt/qemu-build/linux-headers
-I/home/berrange/src/virt/qemu/include

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-10 18:36         ` Daniel P. Berrange
@ 2017-01-10 21:01           ` Paolo Bonzini
  2017-01-11 10:28             ` Daniel P. Berrange
  0 siblings, 1 reply; 83+ messages in thread
From: Paolo Bonzini @ 2017-01-10 21:01 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel, Stefan Hajnoczi



On 10/01/2017 19:36, Daniel P. Berrange wrote:
> 
> It seems you're saying we should also trim the top level dirs, so
> we in fact get:
> 
> 
> -I/home/berrange/src/virt/qemu/hw/scsi
> -Ihw/scsi
> -I/home/berrange/src/virt/qemu/tcg
> -I/home/berrange/src/virt/qemu/tcg/i386
> -I/home/berrange/src/virt/qemu/linux-headers
> -I/home/berrange/src/virt/qemu-build/linux-headers
> -I/home/berrange/src/virt/qemu/include

Yes, and ultimately tcg too.

Paolo

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-10 21:01           ` Paolo Bonzini
@ 2017-01-11 10:28             ` Daniel P. Berrange
  2017-01-11 10:34               ` Daniel P. Berrange
  0 siblings, 1 reply; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-11 10:28 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, Stefan Hajnoczi

On Tue, Jan 10, 2017 at 10:01:12PM +0100, Paolo Bonzini wrote:
> 
> 
> On 10/01/2017 19:36, Daniel P. Berrange wrote:
> > 
> > It seems you're saying we should also trim the top level dirs, so
> > we in fact get:
> > 
> > 
> > -I/home/berrange/src/virt/qemu/hw/scsi
> > -Ihw/scsi
> > -I/home/berrange/src/virt/qemu/tcg
> > -I/home/berrange/src/virt/qemu/tcg/i386
> > -I/home/berrange/src/virt/qemu/linux-headers
> > -I/home/berrange/src/virt/qemu-build/linux-headers
> > -I/home/berrange/src/virt/qemu/include
> 
> Yes, and ultimately tcg too.

So the problem with dropping BUILD_DIR from the include path is that
config-host.h is generated in that location. We'll have to move that
into BIULD_DIR/include and add -I$(BUILDDIR)/include to search path
instead.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-11 10:28             ` Daniel P. Berrange
@ 2017-01-11 10:34               ` Daniel P. Berrange
  2017-01-11 10:50                 ` Paolo Bonzini
  0 siblings, 1 reply; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-11 10:34 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, Stefan Hajnoczi

On Wed, Jan 11, 2017 at 10:28:32AM +0000, Daniel P. Berrange wrote:
> On Tue, Jan 10, 2017 at 10:01:12PM +0100, Paolo Bonzini wrote:
> > 
> > 
> > On 10/01/2017 19:36, Daniel P. Berrange wrote:
> > > 
> > > It seems you're saying we should also trim the top level dirs, so
> > > we in fact get:
> > > 
> > > 
> > > -I/home/berrange/src/virt/qemu/hw/scsi
> > > -Ihw/scsi
> > > -I/home/berrange/src/virt/qemu/tcg
> > > -I/home/berrange/src/virt/qemu/tcg/i386
> > > -I/home/berrange/src/virt/qemu/linux-headers
> > > -I/home/berrange/src/virt/qemu-build/linux-headers
> > > -I/home/berrange/src/virt/qemu/include
> > 
> > Yes, and ultimately tcg too.
> 
> So the problem with dropping BUILD_DIR from the include path is that
> config-host.h is generated in that location. We'll have to move that
> into BIULD_DIR/include and add -I$(BUILDDIR)/include to search path
> instead.

Sigh and much more needs moving too...

	module_block.h
	qapi-event.h
	qapi-types.h
	qapi-visit.h
	qemu-doc.html
	qemu-version.h
	qemu-version.h.tmp
	qmp-commands.h
	qmp-introspect.h

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-11 10:34               ` Daniel P. Berrange
@ 2017-01-11 10:50                 ` Paolo Bonzini
  0 siblings, 0 replies; 83+ messages in thread
From: Paolo Bonzini @ 2017-01-11 10:50 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel, Stefan Hajnoczi



----- Original Message -----
> From: "Daniel P. Berrange" <berrange@redhat.com>
> To: "Paolo Bonzini" <pbonzini@redhat.com>
> Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>
> Sent: Wednesday, January 11, 2017 11:34:42 AM
> Subject: Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
> 
> On Wed, Jan 11, 2017 at 10:28:32AM +0000, Daniel P. Berrange wrote:
> > On Tue, Jan 10, 2017 at 10:01:12PM +0100, Paolo Bonzini wrote:
> > > 
> > > 
> > > On 10/01/2017 19:36, Daniel P. Berrange wrote:
> > > > 
> > > > It seems you're saying we should also trim the top level dirs, so
> > > > we in fact get:
> > > > 
> > > > 
> > > > -I/home/berrange/src/virt/qemu/hw/scsi
> > > > -Ihw/scsi
> > > > -I/home/berrange/src/virt/qemu/tcg
> > > > -I/home/berrange/src/virt/qemu/tcg/i386
> > > > -I/home/berrange/src/virt/qemu/linux-headers
> > > > -I/home/berrange/src/virt/qemu-build/linux-headers
> > > > -I/home/berrange/src/virt/qemu/include
> > > 
> > > Yes, and ultimately tcg too.
> > 
> > So the problem with dropping BUILD_DIR from the include path is that
> > config-host.h is generated in that location. We'll have to move that
> > into BIULD_DIR/include and add -I$(BUILDDIR)/include to search path
> > instead.
> 
> Sigh and much more needs moving too...
> 
> 	module_block.h
> 	qapi-event.h
> 	qapi-types.h
> 	qapi-visit.h
> 	qemu-doc.html
> 	qemu-version.h
> 	qemu-version.h.tmp
> 	qmp-commands.h
> 	qmp-introspect.h

Can we at least move it at the end?

Paolo

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-10 16:51     ` Eric Blake
  2017-01-10 17:47       ` Paolo Bonzini
@ 2017-01-11 17:12       ` Stefan Hajnoczi
  2017-01-11 17:16         ` Daniel P. Berrange
  1 sibling, 1 reply; 83+ messages in thread
From: Stefan Hajnoczi @ 2017-01-11 17:12 UTC (permalink / raw)
  To: Eric Blake; +Cc: Daniel P. Berrange, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]

On Tue, Jan 10, 2017 at 10:51:29AM -0600, Eric Blake wrote:
> On 01/10/2017 10:37 AM, Stefan Hajnoczi wrote:
> > On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
> >> diff --git a/io/channel-buffer.c b/io/channel-buffer.c
> >> index 43d7959..b4e50d6 100644
> >> --- a/io/channel-buffer.c
> >> +++ b/io/channel-buffer.c
> >> @@ -22,7 +22,7 @@
> >>  #include "io/channel-buffer.h"
> >>  #include "io/channel-watch.h"
> >>  #include "qemu/sockets.h"
> >> -#include "trace.h"
> >> +#include "io/trace.h"
> > 
> > Is this change necessary?
> 
> Yes - now that there are more than one trace.h files spread across
> multiple directories, you need a prefix to ensure the correct one gets
> included.  In this particular case, it also matches consistency in
> including "io/channel-buffer.h" rather than just "channel-buffer.h".

"io/channel-buffer.h" is no more consistent or clear than
"channel-buffer.h".

Does it mean include/io/channel-buffer.h or
./include/io/channel-buffer.h?  You don't know unless you know the
compiler include paths and which directories have a channel-buffer.h
file.

IMO a simple "foo.h" is clearest for ./foo.h.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-11 17:12       ` Stefan Hajnoczi
@ 2017-01-11 17:16         ` Daniel P. Berrange
  2017-01-11 17:34           ` Paolo Bonzini
  0 siblings, 1 reply; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-11 17:16 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Eric Blake, qemu-devel

On Wed, Jan 11, 2017 at 05:12:02PM +0000, Stefan Hajnoczi wrote:
> On Tue, Jan 10, 2017 at 10:51:29AM -0600, Eric Blake wrote:
> > On 01/10/2017 10:37 AM, Stefan Hajnoczi wrote:
> > > On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
> > >> diff --git a/io/channel-buffer.c b/io/channel-buffer.c
> > >> index 43d7959..b4e50d6 100644
> > >> --- a/io/channel-buffer.c
> > >> +++ b/io/channel-buffer.c
> > >> @@ -22,7 +22,7 @@
> > >>  #include "io/channel-buffer.h"
> > >>  #include "io/channel-watch.h"
> > >>  #include "qemu/sockets.h"
> > >> -#include "trace.h"
> > >> +#include "io/trace.h"
> > > 
> > > Is this change necessary?
> > 
> > Yes - now that there are more than one trace.h files spread across
> > multiple directories, you need a prefix to ensure the correct one gets
> > included.  In this particular case, it also matches consistency in
> > including "io/channel-buffer.h" rather than just "channel-buffer.h".
> 
> "io/channel-buffer.h" is no more consistent or clear than
> "channel-buffer.h".
> 
> Does it mean include/io/channel-buffer.h or
> ./include/io/channel-buffer.h?  You don't know unless you know the
> compiler include paths and which directories have a channel-buffer.h
> file.
> 
> IMO a simple "foo.h" is clearest for ./foo.h.

I've been trying to get such relative includes to work most of today
and not having much luck. The problem is that while it works in 95%
of the time, there are some source files and header files which need
to include trace.h files not in their local directory and we can't
use relative includes for that, since the relative include gets
resolved wrt the source file doing the #include, but the trace.h
file is in $BUILD_DIR.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-10 16:38   ` Stefan Hajnoczi
@ 2017-01-11 17:17     ` Daniel P. Berrange
  0 siblings, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-11 17:17 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel

On Tue, Jan 10, 2017 at 04:38:58PM +0000, Stefan Hajnoczi wrote:
> On Fri, Jan 06, 2017 at 03:54:58PM +0000, Daniel P. Berrange wrote:
> > diff --git a/io/Makefile.objs b/io/Makefile.objs
> > index 9d8337d..94cb74e 100644
> > --- a/io/Makefile.objs
> > +++ b/io/Makefile.objs
> > @@ -8,3 +8,5 @@ io-obj-y += channel-watch.o
> >  io-obj-y += channel-websock.o
> >  io-obj-y += channel-util.o
> >  io-obj-y += task.o
> > +trace-obj-y += trace.o
> > +trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
> 
> Is there a way to eliminate this boilerplate?  If the directory has a
> trace-events file then it requires trace.o/trace-dtrace.o.

Yes in fact. I figured out a rule in the top level Makefile.objs that can
do this for all sub-dirs

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-11 17:16         ` Daniel P. Berrange
@ 2017-01-11 17:34           ` Paolo Bonzini
  2017-01-11 17:40             ` Daniel P. Berrange
  0 siblings, 1 reply; 83+ messages in thread
From: Paolo Bonzini @ 2017-01-11 17:34 UTC (permalink / raw)
  To: Daniel P. Berrange, Stefan Hajnoczi; +Cc: qemu-devel



On 11/01/2017 18:16, Daniel P. Berrange wrote:
> I've been trying to get such relative includes to work most of today
> and not having much luck. The problem is that while it works in 95%
> of the time, there are some source files and header files which need
> to include trace.h files not in their local directory

Which are they?  I wouldn't have expected that to happen.

> and we can't
> use relative includes for that, since the relative include gets
> resolved wrt the source file doing the #include, but the trace.h
> file is in $BUILD_DIR.

Why would #include "../foo/trace.h" be resolved against the source
file's path only, and not against all -I directories?

Paolo

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-11 17:34           ` Paolo Bonzini
@ 2017-01-11 17:40             ` Daniel P. Berrange
  2017-01-11 18:05               ` Paolo Bonzini
  2017-01-12  0:59               ` Lluís Vilanova
  0 siblings, 2 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-11 17:40 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Stefan Hajnoczi, qemu-devel

On Wed, Jan 11, 2017 at 06:34:40PM +0100, Paolo Bonzini wrote:
> 
> 
> On 11/01/2017 18:16, Daniel P. Berrange wrote:
> > I've been trying to get such relative includes to work most of today
> > and not having much luck. The problem is that while it works in 95%
> > of the time, there are some source files and header files which need
> > to include trace.h files not in their local directory
> 
> Which are they?  I wouldn't have expected that to happen.

It is indirect - particularly Xen - include/hw/xen/xen_common.h hsa
some trace points and that is included from many different source
files. Likewise with include/exec/cpu_ldst_template.h


> > and we can't
> > use relative includes for that, since the relative include gets
> > resolved wrt the source file doing the #include, but the trace.h
> > file is in $BUILD_DIR.
> 
> Why would #include "../foo/trace.h" be resolved against the source
> file's path only, and not against all -I directories?

If we have a plain "../trace.h", then it can end up hitting the
wrong file, because there are many -I dirs listed and most of
them contain a trace.h file, so if it matches on the 2nd -I
dir and you need the one from the 3rd -I dir it gets "fun".

Having all the trace.h files included with path from the root
is alot simpler to understand IMHO than just plain "trace.h"
and hoping the -I order is going to ensure the right one is
found

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-11 17:40             ` Daniel P. Berrange
@ 2017-01-11 18:05               ` Paolo Bonzini
  2017-01-12  1:02                 ` Lluís Vilanova
  2017-01-12  0:59               ` Lluís Vilanova
  1 sibling, 1 reply; 83+ messages in thread
From: Paolo Bonzini @ 2017-01-11 18:05 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: Stefan Hajnoczi, qemu-devel



On 11/01/2017 18:40, Daniel P. Berrange wrote:
> On Wed, Jan 11, 2017 at 06:34:40PM +0100, Paolo Bonzini wrote:
>>
>>
>> On 11/01/2017 18:16, Daniel P. Berrange wrote:
>>> I've been trying to get such relative includes to work most of today
>>> and not having much luck. The problem is that while it works in 95%
>>> of the time, there are some source files and header files which need
>>> to include trace.h files not in their local directory
>>
>> Which are they?  I wouldn't have expected that to happen.
> 
> It is indirect - particularly Xen - include/hw/xen/xen_common.h hsa
> some trace points and that is included from many different source
> files. Likewise with include/exec/cpu_ldst_template.h

I see.  Yeah, this gets tricky for template-style headers.  (In the case
of include/hw/xen/xen_common.h I would just move the functions to a .c
file, but that's a separate thing and the template-style headers are a
real problem).

>>> and we can't
>>> use relative includes for that, since the relative include gets
>>> resolved wrt the source file doing the #include, but the trace.h
>>> file is in $BUILD_DIR.
>>
>> Why would #include "../foo/trace.h" be resolved against the source
>> file's path only, and not against all -I directories?
> 
> If we have a plain "../trace.h", then it can end up hitting the
> wrong file, because there are many -I dirs listed and most of
> them contain a trace.h file, so if it matches on the 2nd -I
> dir and you need the one from the 3rd -I dir it gets "fun".

Hmm, I would have expected only the .o directory to have a ../trace.h.
But again it doesn't help for template-style headers where ../trace.h is
resolved according to the including file, not the included file.

A weird idea: what about doing

    -DGENERATED_TRACERS_H=\"hw/scsi/generated-tracers.h\"

and then having

     #ifdef GENERATED_TRACE_H
     #include GENERATED_TRACE_H
     #endif

in include/trace.h?

Then you can use full include path for special cases such as
include/hw/xen/xen_common.h, but the common case is handled directly
with just

     #include "trace.h"

which refers to $(srcdir)/include/trace.h? (Take the above with a grain
of salt because I haven't reviewed the patches closely).

Paolo

> Having all the trace.h files included with path from the root
> is alot simpler to understand IMHO than just plain "trace.h"
> and hoping the -I order is going to ensure the right one is
> found

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-11 17:40             ` Daniel P. Berrange
  2017-01-11 18:05               ` Paolo Bonzini
@ 2017-01-12  0:59               ` Lluís Vilanova
  1 sibling, 0 replies; 83+ messages in thread
From: Lluís Vilanova @ 2017-01-12  0:59 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: Paolo Bonzini, qemu-devel, Stefan Hajnoczi

Daniel P Berrange writes:

> On Wed, Jan 11, 2017 at 06:34:40PM +0100, Paolo Bonzini wrote:
[...]
>> > and we can't
>> > use relative includes for that, since the relative include gets
>> > resolved wrt the source file doing the #include, but the trace.h
>> > file is in $BUILD_DIR.
>> 
>> Why would #include "../foo/trace.h" be resolved against the source
>> file's path only, and not against all -I directories?

> If we have a plain "../trace.h", then it can end up hitting the
> wrong file, because there are many -I dirs listed and most of
> them contain a trace.h file, so if it matches on the 2nd -I
> dir and you need the one from the 3rd -I dir it gets "fun".

> Having all the trace.h files included with path from the root
> is alot simpler to understand IMHO than just plain "trace.h"
> and hoping the -I order is going to ensure the right one is
> found

I'm with Daniel and and Eric on this one, for whatever it matters. It's clearer
to *me* to have includes starting on the project's root.


Cheers,
  Lluis

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-11 18:05               ` Paolo Bonzini
@ 2017-01-12  1:02                 ` Lluís Vilanova
  2017-01-12  8:48                   ` Paolo Bonzini
  0 siblings, 1 reply; 83+ messages in thread
From: Lluís Vilanova @ 2017-01-12  1:02 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Daniel P. Berrange, qemu-devel, Stefan Hajnoczi

Paolo Bonzini writes:
[...]
> A weird idea: what about doing

>     -DGENERATED_TRACERS_H=\"hw/scsi/generated-tracers.h\"

> and then having

>      #ifdef GENERATED_TRACE_H
>      #include GENERATED_TRACE_H
>      #endif

> in include/trace.h?

> Then you can use full include path for special cases such as
> include/hw/xen/xen_common.h, but the common case is handled directly
> with just

>      #include "trace.h"

> which refers to $(srcdir)/include/trace.h? (Take the above with a grain
> of salt because I haven't reviewed the patches closely).

Feels like too much black magic to me for the benefit of a bit less typing.


Cheers,
  Lluis

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-12  1:02                 ` Lluís Vilanova
@ 2017-01-12  8:48                   ` Paolo Bonzini
  2017-01-12 14:29                     ` Lluís Vilanova
  2017-01-12 14:30                     ` Daniel P. Berrange
  0 siblings, 2 replies; 83+ messages in thread
From: Paolo Bonzini @ 2017-01-12  8:48 UTC (permalink / raw)
  To: Daniel P. Berrange, qemu-devel, Stefan Hajnoczi



On 12/01/2017 02:02, Lluís Vilanova wrote:
> Paolo Bonzini writes:
> [...]
>> A weird idea: what about doing
> 
>>     -DGENERATED_TRACERS_H=\"hw/scsi/generated-tracers.h\"
> 
>> and then having
> 
>>      #ifdef GENERATED_TRACE_H
>>      #include GENERATED_TRACE_H
>>      #endif
> 
>> in include/trace.h?
> 
>> Then you can use full include path for special cases such as
>> include/hw/xen/xen_common.h, but the common case is handled directly
>> with just
> 
>>      #include "trace.h"
> 
>> which refers to $(srcdir)/include/trace.h? (Take the above with a grain
>> of salt because I haven't reviewed the patches closely).
> 
> Feels like too much black magic to me for the benefit of a bit less typing.

It's not less typing, it's about consistency.   Includes from the
current directory are currently included with no path.

Paolo

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-12  8:48                   ` Paolo Bonzini
@ 2017-01-12 14:29                     ` Lluís Vilanova
  2017-01-12 14:30                     ` Daniel P. Berrange
  1 sibling, 0 replies; 83+ messages in thread
From: Lluís Vilanova @ 2017-01-12 14:29 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Daniel P. Berrange, qemu-devel, Stefan Hajnoczi

Paolo Bonzini writes:

> On 12/01/2017 02:02, Lluís Vilanova wrote:
>> Paolo Bonzini writes:
>> [...]
>>> A weird idea: what about doing
>> 
>>> -DGENERATED_TRACERS_H=\"hw/scsi/generated-tracers.h\"
>> 
>>> and then having
>> 
>>> #ifdef GENERATED_TRACE_H
>>> #include GENERATED_TRACE_H
>>> #endif
>> 
>>> in include/trace.h?
>> 
>>> Then you can use full include path for special cases such as
>>> include/hw/xen/xen_common.h, but the common case is handled directly
>>> with just
>> 
>>> #include "trace.h"
>> 
>>> which refers to $(srcdir)/include/trace.h? (Take the above with a grain
>>> of salt because I haven't reviewed the patches closely).
>> 
>> Feels like too much black magic to me for the benefit of a bit less typing.

> It's not less typing, it's about consistency.   Includes from the
> current directory are currently included with no path.

Ah, right. My subconscious made me ignore that, since I already said it's
cleaner to me to use the "full" path. Sorry about that :)


Cheers,
  Lluis

^ permalink raw reply	[flat|nested] 83+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file
  2017-01-12  8:48                   ` Paolo Bonzini
  2017-01-12 14:29                     ` Lluís Vilanova
@ 2017-01-12 14:30                     ` Daniel P. Berrange
  1 sibling, 0 replies; 83+ messages in thread
From: Daniel P. Berrange @ 2017-01-12 14:30 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, Stefan Hajnoczi

On Thu, Jan 12, 2017 at 09:48:20AM +0100, Paolo Bonzini wrote:
> 
> 
> On 12/01/2017 02:02, Lluís Vilanova wrote:
> > Paolo Bonzini writes:
> > [...]
> >> A weird idea: what about doing
> > 
> >>     -DGENERATED_TRACERS_H=\"hw/scsi/generated-tracers.h\"
> > 
> >> and then having
> > 
> >>      #ifdef GENERATED_TRACE_H
> >>      #include GENERATED_TRACE_H
> >>      #endif
> > 
> >> in include/trace.h?
> > 
> >> Then you can use full include path for special cases such as
> >> include/hw/xen/xen_common.h, but the common case is handled directly
> >> with just
> > 
> >>      #include "trace.h"
> > 
> >> which refers to $(srcdir)/include/trace.h? (Take the above with a grain
> >> of salt because I haven't reviewed the patches closely).
> > 
> > Feels like too much black magic to me for the benefit of a bit less typing.
> 
> It's not less typing, it's about consistency.   Includes from the
> current directory are currently included with no path.

I think I am able to workaround the problems by just renaming the
top level file to trace-root.h to avoid ambiguity. Just testing
builds now...

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 83+ messages in thread

end of thread, other threads:[~2017-01-12 14:31 UTC | newest]

Thread overview: 83+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-06 15:54 [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 01/47] trace: introduce some Makefile rules for module code gen Daniel P. Berrange
2017-01-06 17:20   ` Lluís Vilanova
2017-01-06 17:25     ` Daniel P. Berrange
2017-01-06 20:53       ` Lluís Vilanova
2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 02/47] trace: switch io/ directory to modular trace.h file Daniel P. Berrange
2017-01-10 16:37   ` Stefan Hajnoczi
2017-01-10 16:51     ` Daniel P. Berrange
2017-01-10 17:45       ` Paolo Bonzini
2017-01-10 18:36         ` Daniel P. Berrange
2017-01-10 21:01           ` Paolo Bonzini
2017-01-11 10:28             ` Daniel P. Berrange
2017-01-11 10:34               ` Daniel P. Berrange
2017-01-11 10:50                 ` Paolo Bonzini
2017-01-10 16:51     ` Eric Blake
2017-01-10 17:47       ` Paolo Bonzini
2017-01-11 17:12       ` Stefan Hajnoczi
2017-01-11 17:16         ` Daniel P. Berrange
2017-01-11 17:34           ` Paolo Bonzini
2017-01-11 17:40             ` Daniel P. Berrange
2017-01-11 18:05               ` Paolo Bonzini
2017-01-12  1:02                 ` Lluís Vilanova
2017-01-12  8:48                   ` Paolo Bonzini
2017-01-12 14:29                     ` Lluís Vilanova
2017-01-12 14:30                     ` Daniel P. Berrange
2017-01-12  0:59               ` Lluís Vilanova
2017-01-10 16:38   ` Stefan Hajnoczi
2017-01-11 17:17     ` Daniel P. Berrange
2017-01-06 15:54 ` [Qemu-devel] [PATCH v2 03/47] trace: switch util/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 04/47] trace: switch crypto/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 05/47] trace: switch migration/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 06/47] trace: switch block/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 07/47] trace: switch hw/block/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 08/47] trace: switch hw/char/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 09/47] trace: switch hw/intc/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 10/47] trace: switch hw/net/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 11/47] trace: switch hw/virtio/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 12/47] trace: switch hw/audio/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 13/47] trace: switch hw/misc/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 14/47] trace: switch hw/usb/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 15/47] trace: switch hw/scsi/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 16/47] trace: switch hw/nvram/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 17/47] trace: switch hw/display/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 18/47] trace: switch hw/input/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 19/47] trace: switch hw/timer/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 20/47] trace: switch hw/dma/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 21/47] trace: switch hw/sparc/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 22/47] trace: switch hw/sd/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 23/47] trace: switch hw/isa/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 24/47] trace: switch hw/mem/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 25/47] trace: switch hw/i386/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 26/47] trace: switch hw/9pfs/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 27/47] trace: switch hw/ppc/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 28/47] trace: switch hw/pci/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 29/47] trace: switch hw/s390x/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 30/47] trace: switch hw/vfio/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 31/47] trace: switch hw/acpi/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 32/47] trace: switch hw/arm/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 33/47] trace: switch hw/alpha/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 34/47] trace: switch ui/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 35/47] trace: switch audio/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 36/47] trace: switch net/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 37/47] trace: switch target/arm/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 38/47] trace: switch target/i386/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 39/47] trace: switch target/sparc/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 40/47] trace: switch target/s390x/ " Daniel P. Berrange
2017-01-06 17:09   ` Lluís Vilanova
2017-01-06 17:18     ` Daniel P. Berrange
2017-01-06 20:45       ` Lluís Vilanova
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 41/47] trace: switch target/ppc/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 42/47] trace: switch qom/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 43/47] trace: switch linux-user/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 44/47] trace: switch qapi/ " Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 45/47] trace: remove the global include/trace.h file Daniel P. Berrange
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 46/47] trace: update docs to reflect new code generation approach Daniel P. Berrange
2017-01-06 17:26   ` Lluís Vilanova
2017-01-06 18:13   ` Eric Blake
2017-01-06 15:55 ` [Qemu-devel] [PATCH v2 47/47] trace: improve error reporting when parsing simpletrace header Daniel P. Berrange
2017-01-06 18:15   ` Eric Blake
2017-01-10 16:40   ` Stefan Hajnoczi
2017-01-06 16:05 ` [Qemu-devel] [PATCH v2 00/47] Switch all subdirs over to modular trace.h file Daniel P. Berrange
2017-01-06 17:02 ` no-reply
2017-01-06 17:23   ` Daniel P. Berrange

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.