ソースを参照

trace: switch position of headers to what Meson requires

Meson doesn't enjoy the same flexibility we have with Make in choosing
the include path.  In particular the tracing headers are using
$(build_root)/$(<D).

In order to keep the include directives unchanged,
the simplest solution is to generate headers with patterns like
"trace/trace-audio.h" and place forwarding headers in the source tree
such that for example "audio/trace.h" includes "trace/trace-audio.h".

This patch is too ugly to be applied to the Makefiles now.  It's only
a way to separate the changes to the tracing header files from the
Meson rewrite of the tracing logic.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini 5 年 前
コミット
243af0225a
96 ファイル変更121 行追加41 行削除
  1. 0 1
      .gitignore
  2. 28 18
      Makefile
  3. 0 1
      Makefile.objs
  4. 1 0
      accel/kvm/trace.h
  5. 1 1
      accel/tcg/cputlb.c
  6. 1 0
      accel/tcg/trace.h
  7. 1 1
      accel/tcg/user-exec.c
  8. 1 0
      audio/trace.h
  9. 1 0
      authz/trace.h
  10. 1 0
      backends/tpm/trace.h
  11. 1 0
      backends/trace.h
  12. 1 0
      block/trace.h
  13. 1 0
      chardev/trace.h
  14. 1 0
      crypto/trace.h
  15. 1 1
      dma-helpers.c
  16. 1 1
      exec.c
  17. 1 1
      gdbstub.c
  18. 1 0
      hw/9pfs/trace.h
  19. 1 0
      hw/acpi/trace.h
  20. 1 0
      hw/alpha/trace.h
  21. 1 0
      hw/arm/trace.h
  22. 1 0
      hw/audio/trace.h
  23. 1 0
      hw/block/dataplane/trace.h
  24. 1 0
      hw/block/trace.h
  25. 1 0
      hw/char/trace.h
  26. 1 1
      hw/core/cpu.c
  27. 1 0
      hw/core/trace.h
  28. 1 0
      hw/display/trace.h
  29. 1 0
      hw/dma/trace.h
  30. 1 0
      hw/gpio/trace.h
  31. 1 0
      hw/hppa/trace.h
  32. 1 0
      hw/hyperv/trace.h
  33. 1 0
      hw/i2c/trace.h
  34. 1 0
      hw/i386/trace.h
  35. 1 0
      hw/i386/xen/trace.h
  36. 1 0
      hw/ide/trace.h
  37. 1 0
      hw/input/trace.h
  38. 1 0
      hw/intc/trace.h
  39. 1 0
      hw/isa/trace.h
  40. 1 0
      hw/mem/trace.h
  41. 1 0
      hw/mips/trace.h
  42. 1 0
      hw/misc/macio/trace.h
  43. 1 0
      hw/misc/trace.h
  44. 1 0
      hw/net/trace.h
  45. 1 0
      hw/nvram/trace.h
  46. 1 0
      hw/pci-host/trace.h
  47. 1 0
      hw/pci/trace.h
  48. 1 0
      hw/ppc/trace.h
  49. 1 0
      hw/rdma/trace.h
  50. 1 0
      hw/rdma/vmw/trace.h
  51. 1 0
      hw/riscv/trace.h
  52. 1 0
      hw/rtc/trace.h
  53. 1 0
      hw/s390x/trace.h
  54. 1 0
      hw/scsi/trace.h
  55. 1 0
      hw/sd/trace.h
  56. 1 0
      hw/sparc/trace.h
  57. 1 0
      hw/sparc64/trace.h
  58. 1 0
      hw/ssi/trace.h
  59. 1 0
      hw/timer/trace.h
  60. 1 0
      hw/tpm/trace.h
  61. 1 0
      hw/usb/trace.h
  62. 1 0
      hw/vfio/trace.h
  63. 1 0
      hw/virtio/trace.h
  64. 1 0
      hw/watchdog/trace.h
  65. 1 0
      hw/xen/trace.h
  66. 1 1
      include/user/syscall-trace.h
  67. 1 0
      io/trace.h
  68. 1 1
      job-qmp.c
  69. 1 1
      job.c
  70. 1 0
      linux-user/trace.h
  71. 1 0
      migration/trace.h
  72. 1 0
      monitor/trace.h
  73. 1 0
      nbd/trace.h
  74. 1 0
      net/trace.h
  75. 1 0
      qapi/trace.h
  76. 1 0
      qom/trace.h
  77. 1 4
      scripts/tracetool/format/c.py
  78. 1 1
      scripts/tracetool/format/tcg_h.py
  79. 1 1
      scripts/tracetool/format/tcg_helper_c.py
  80. 1 0
      scsi/trace.h
  81. 1 1
      softmmu/balloon.c
  82. 1 1
      softmmu/ioport.c
  83. 1 1
      softmmu/memory.c
  84. 1 1
      softmmu/vl.c
  85. 1 0
      target/arm/trace.h
  86. 1 0
      target/hppa/trace.h
  87. 1 0
      target/i386/trace.h
  88. 1 0
      target/mips/trace.h
  89. 1 0
      target/ppc/trace.h
  90. 1 0
      target/riscv/trace.h
  91. 1 0
      target/s390x/trace.h
  92. 1 0
      target/sparc/trace.h
  93. 1 1
      trace/control-target.c
  94. 1 1
      trace/control.c
  95. 1 0
      ui/trace.h
  96. 1 0
      util/trace.h

+ 0 - 1
.gitignore

@@ -146,7 +146,6 @@ docker-src.*
 *~
 *~
 *.ast_raw
 *.ast_raw
 *.depend_raw
 *.depend_raw
-trace.h
 trace.c
 trace.c
 trace-ust.h
 trace-ust.h
 trace-ust.h
 trace-ust.h

+ 28 - 18
Makefile

@@ -159,8 +159,8 @@ generated-files-$(CONFIG_TRACE_UST) += trace-ust-all.c
 
 
 generated-files-y += module_block.h
 generated-files-y += module_block.h
 
 
-TRACE_HEADERS = trace-root.h $(trace-events-subdirs:%=%/trace.h)
-TRACE_SOURCES = trace-root.c $(trace-events-subdirs:%=%/trace.c)
+TRACE_HEADERS = trace/trace-root.h
+TRACE_SOURCES = trace/trace-root.c
 TRACE_DTRACE =
 TRACE_DTRACE =
 ifdef CONFIG_TRACE_DTRACE
 ifdef CONFIG_TRACE_DTRACE
 TRACE_HEADERS += trace-dtrace-root.h $(trace-events-subdirs:%=%/trace-dtrace.h)
 TRACE_HEADERS += trace-dtrace-root.h $(trace-events-subdirs:%=%/trace-dtrace.h)
@@ -170,33 +170,37 @@ ifdef CONFIG_TRACE_UST
 TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h)
 TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h)
 endif
 endif
 
 
-generated-files-y += $(TRACE_HEADERS)
-generated-files-y += $(TRACE_SOURCES)
 generated-files-y += $(BUILD_DIR)/trace-events-all
 generated-files-y += $(BUILD_DIR)/trace-events-all
 generated-files-y += .git-submodule-status
 generated-files-y += .git-submodule-status
 
 
 trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
 trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
+trace-group-suffix = $(shell echo $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
 
 
 tracetool-y = $(SRC_PATH)/scripts/tracetool.py
 tracetool-y = $(SRC_PATH)/scripts/tracetool.py
 tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
 tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
 
 
-%/trace.h: %/trace.h-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
+define __trace_rules
+TRACE_HEADERS += trace/trace-$2.h
+TRACE_SOURCES += trace/trace-$2.c
+trace-obj-y += trace/trace-$2.o
+trace/trace-$2.h: trace/trace-$2.h-timestamp
+	@cmp $$< $$@ >/dev/null 2>&1 || cp $$< $$@
+trace/trace-$2.h-timestamp: $(SRC_PATH)/$1/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
 	$(call quiet-command,$(TRACETOOL) \
 	$(call quiet-command,$(TRACETOOL) \
-		--group=$(call trace-group-name,$@) \
+		--group=$2 \
 		--format=h \
 		--format=h \
 		--backends=$(TRACE_BACKENDS) \
 		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(@:%-timestamp=%)")
+		$$< > $$@,"GEN","$$(@:%-timestamp=%)")
 
 
-%/trace.c: %/trace.c-timestamp
-	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
+trace/trace-$2.c: trace/trace-$2.c-timestamp
+	@cmp $$< $$@ >/dev/null 2>&1 || cp $$< $$@
+trace/trace-$2.c-timestamp: $(SRC_PATH)/$1/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
 	$(call quiet-command,$(TRACETOOL) \
 	$(call quiet-command,$(TRACETOOL) \
-		--group=$(call trace-group-name,$@) \
+		--group=$2 \
 		--format=c \
 		--format=c \
 		--backends=$(TRACE_BACKENDS) \
 		--backends=$(TRACE_BACKENDS) \
-		$< > $@,"GEN","$(@:%-timestamp=%)")
+		$$< > $$@,"GEN","$$(@:%-timestamp=%)")
+endef
 
 
 %/trace-ust.h: %/trace-ust.h-timestamp
 %/trace-ust.h: %/trace-ust.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
@@ -222,18 +226,18 @@ tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
 %/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y)
 %/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y)
 
 
 
 
-trace-root.h: trace-root.h-timestamp
+trace/trace-root.h: trace/trace-root.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
+trace/trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
 	$(call quiet-command,$(TRACETOOL) \
 	$(call quiet-command,$(TRACETOOL) \
 		--group=root \
 		--group=root \
 		--format=h \
 		--format=h \
 		--backends=$(TRACE_BACKENDS) \
 		--backends=$(TRACE_BACKENDS) \
 		$< > $@,"GEN","$(@:%-timestamp=%)")
 		$< > $@,"GEN","$(@:%-timestamp=%)")
 
 
-trace-root.c: trace-root.c-timestamp
+trace/trace-root.c: trace/trace-root.c-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
+trace/trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) $(BUILD_DIR)/config-host.mak
 	$(call quiet-command,$(TRACETOOL) \
 	$(call quiet-command,$(TRACETOOL) \
 		--group=root \
 		--group=root \
 		--format=c \
 		--format=c \
@@ -477,6 +481,12 @@ dummy := $(call unnest-vars,, \
                 common-obj-m \
                 common-obj-m \
                 trace-obj-y)
                 trace-obj-y)
 
 
+dummy := $(foreach DIR,$(trace-events-subdirs),$(eval $(call __trace_rules,$(DIR),$(call trace-group-suffix,$(DIR)))))
+
+generated-files-y += $(TRACE_HEADERS)
+generated-files-y += $(TRACE_SOURCES)
+
+
 include $(SRC_PATH)/tests/Makefile.include
 include $(SRC_PATH)/tests/Makefile.include
 
 
 all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules $(vhost-user-json-y)
 all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) $(TOOLS) $(HELPERS-y) recurse-all modules $(vhost-user-json-y)

+ 0 - 1
Makefile.objs

@@ -209,7 +209,6 @@ trace-events-subdirs += util
 trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
 trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
 
 
 trace-obj-y = trace-root.o
 trace-obj-y = trace-root.o
-trace-obj-y += $(trace-events-subdirs:%=%/trace.o)
 trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
 trace-obj-$(CONFIG_TRACE_UST) += trace-ust-all.o
 trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
 trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace-root.o
 trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)
 trace-obj-$(CONFIG_TRACE_DTRACE) += $(trace-events-subdirs:%=%/trace-dtrace.o)

+ 1 - 0
accel/kvm/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-accel_kvm.h"

+ 1 - 1
accel/tcg/cputlb.c

@@ -34,7 +34,7 @@
 #include "qemu/atomic.h"
 #include "qemu/atomic.h"
 #include "qemu/atomic128.h"
 #include "qemu/atomic128.h"
 #include "translate-all.h"
 #include "translate-all.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "trace/mem.h"
 #include "trace/mem.h"
 #ifdef CONFIG_PLUGIN
 #ifdef CONFIG_PLUGIN
 #include "qemu/plugin-memory.h"
 #include "qemu/plugin-memory.h"

+ 1 - 0
accel/tcg/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-accel_tcg.h"

+ 1 - 1
accel/tcg/user-exec.c

@@ -26,7 +26,7 @@
 #include "translate-all.h"
 #include "translate-all.h"
 #include "exec/helper-proto.h"
 #include "exec/helper-proto.h"
 #include "qemu/atomic128.h"
 #include "qemu/atomic128.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "trace/mem.h"
 #include "trace/mem.h"
 
 
 #undef EAX
 #undef EAX

+ 1 - 0
audio/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-audio.h"

+ 1 - 0
authz/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-authz.h"

+ 1 - 0
backends/tpm/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-backends_tpm.h"

+ 1 - 0
backends/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-backends.h"

+ 1 - 0
block/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-block.h"

+ 1 - 0
chardev/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-chardev.h"

+ 1 - 0
crypto/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-crypto.h"

+ 1 - 1
dma-helpers.c

@@ -10,7 +10,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/dma.h"
 #include "sysemu/dma.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "qemu/thread.h"
 #include "qemu/thread.h"
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "sysemu/cpus.h"
 #include "sysemu/cpus.h"

+ 1 - 1
exec.c

@@ -50,7 +50,7 @@
 #include "sysemu/hw_accel.h"
 #include "sysemu/hw_accel.h"
 #include "exec/address-spaces.h"
 #include "exec/address-spaces.h"
 #include "sysemu/xen-mapcache.h"
 #include "sysemu/xen-mapcache.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 
 #ifdef CONFIG_FALLOCATE_PUNCH_HOLE
 #ifdef CONFIG_FALLOCATE_PUNCH_HOLE
 #include <linux/falloc.h>
 #include <linux/falloc.h>

+ 1 - 1
gdbstub.c

@@ -30,7 +30,7 @@
 #include "qemu/ctype.h"
 #include "qemu/ctype.h"
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"
 #include "qemu/module.h"
 #include "qemu/module.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #ifdef CONFIG_USER_ONLY
 #ifdef CONFIG_USER_ONLY
 #include "qemu.h"
 #include "qemu.h"
 #else
 #else

+ 1 - 0
hw/9pfs/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_9pfs.h"

+ 1 - 0
hw/acpi/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_acpi.h"

+ 1 - 0
hw/alpha/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_alpha.h"

+ 1 - 0
hw/arm/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_arm.h"

+ 1 - 0
hw/audio/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_audio.h"

+ 1 - 0
hw/block/dataplane/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_block_dataplane.h"

+ 1 - 0
hw/block/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_block.h"

+ 1 - 0
hw/char/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_char.h"

+ 1 - 1
hw/core/cpu.c

@@ -31,7 +31,7 @@
 #include "sysemu/tcg.h"
 #include "sysemu/tcg.h"
 #include "hw/boards.h"
 #include "hw/boards.h"
 #include "hw/qdev-properties.h"
 #include "hw/qdev-properties.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "qemu/plugin.h"
 #include "qemu/plugin.h"
 
 
 CPUInterruptHandler cpu_interrupt_handler;
 CPUInterruptHandler cpu_interrupt_handler;

+ 1 - 0
hw/core/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_core.h"

+ 1 - 0
hw/display/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_display.h"

+ 1 - 0
hw/dma/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_dma.h"

+ 1 - 0
hw/gpio/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_gpio.h"

+ 1 - 0
hw/hppa/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_hppa.h"

+ 1 - 0
hw/hyperv/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_hyperv.h"

+ 1 - 0
hw/i2c/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_i2c.h"

+ 1 - 0
hw/i386/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_i386.h"

+ 1 - 0
hw/i386/xen/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_i386_xen.h"

+ 1 - 0
hw/ide/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_ide.h"

+ 1 - 0
hw/input/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_input.h"

+ 1 - 0
hw/intc/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_intc.h"

+ 1 - 0
hw/isa/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_isa.h"

+ 1 - 0
hw/mem/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_mem.h"

+ 1 - 0
hw/mips/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_mips.h"

+ 1 - 0
hw/misc/macio/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_misc_macio.h"

+ 1 - 0
hw/misc/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_misc.h"

+ 1 - 0
hw/net/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_net.h"

+ 1 - 0
hw/nvram/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_nvram.h"

+ 1 - 0
hw/pci-host/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_pci_host.h"

+ 1 - 0
hw/pci/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_pci.h"

+ 1 - 0
hw/ppc/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_ppc.h"

+ 1 - 0
hw/rdma/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_rdma.h"

+ 1 - 0
hw/rdma/vmw/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_rdma_vmw.h"

+ 1 - 0
hw/riscv/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_riscv.h"

+ 1 - 0
hw/rtc/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_rtc.h"

+ 1 - 0
hw/s390x/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_s390x.h"

+ 1 - 0
hw/scsi/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_scsi.h"

+ 1 - 0
hw/sd/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_sd.h"

+ 1 - 0
hw/sparc/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_sparc.h"

+ 1 - 0
hw/sparc64/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_sparc64.h"

+ 1 - 0
hw/ssi/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_ssi.h"

+ 1 - 0
hw/timer/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_timer.h"

+ 1 - 0
hw/tpm/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_tpm.h"

+ 1 - 0
hw/usb/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_usb.h"

+ 1 - 0
hw/vfio/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_vfio.h"

+ 1 - 0
hw/virtio/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_virtio.h"

+ 1 - 0
hw/watchdog/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_watchdog.h"

+ 1 - 0
hw/xen/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-hw_xen.h"

+ 1 - 1
include/user/syscall-trace.h

@@ -10,7 +10,7 @@
 #ifndef _SYSCALL_TRACE_H_
 #ifndef _SYSCALL_TRACE_H_
 #define _SYSCALL_TRACE_H_
 #define _SYSCALL_TRACE_H_
 
 
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 
 /*
 /*
  * These helpers just provide a common place for the various
  * These helpers just provide a common place for the various

+ 1 - 0
io/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-io.h"

+ 1 - 1
job-qmp.c

@@ -27,7 +27,7 @@
 #include "qemu/job.h"
 #include "qemu/job.h"
 #include "qapi/qapi-commands-job.h"
 #include "qapi/qapi-commands-job.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 
 /* Get a job using its ID and acquire its AioContext */
 /* Get a job using its ID and acquire its AioContext */
 static Job *find_job(const char *id, AioContext **aio_context, Error **errp)
 static Job *find_job(const char *id, AioContext **aio_context, Error **errp)

+ 1 - 1
job.c

@@ -29,7 +29,7 @@
 #include "qemu/id.h"
 #include "qemu/id.h"
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "block/aio-wait.h"
 #include "block/aio-wait.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "qapi/qapi-events-job.h"
 #include "qapi/qapi-events-job.h"
 
 
 static QLIST_HEAD(, Job) jobs = QLIST_HEAD_INITIALIZER(jobs);
 static QLIST_HEAD(, Job) jobs = QLIST_HEAD_INITIALIZER(jobs);

+ 1 - 0
linux-user/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-linux_user.h"

+ 1 - 0
migration/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-migration.h"

+ 1 - 0
monitor/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-monitor.h"

+ 1 - 0
nbd/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-nbd.h"

+ 1 - 0
net/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-net.h"

+ 1 - 0
qapi/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-qapi.h"

+ 1 - 0
qom/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-qom.h"

+ 1 - 4
scripts/tracetool/format/c.py

@@ -19,10 +19,7 @@ def generate(events, backend, group):
     active_events = [e for e in events
     active_events = [e for e in events
                      if "disable" not in e.properties]
                      if "disable" not in e.properties]
 
 
-    if group == "root":
-        header = "trace-root.h"
-    else:
-        header = "trace.h"
+    header = "trace-" + group + ".h"
 
 
     out('/* This file is autogenerated by tracetool, do not edit. */',
     out('/* This file is autogenerated by tracetool, do not edit. */',
         '',
         '',

+ 1 - 1
scripts/tracetool/format/tcg_h.py

@@ -28,7 +28,7 @@ def vcpu_transform_args(args):
 
 
 def generate(events, backend, group):
 def generate(events, backend, group):
     if group == "root":
     if group == "root":
-        header = "trace-root.h"
+        header = "trace/trace-root.h"
     else:
     else:
         header = "trace.h"
         header = "trace.h"
 
 

+ 1 - 1
scripts/tracetool/format/tcg_helper_c.py

@@ -41,7 +41,7 @@ def vcpu_transform_args(args, mode):
 
 
 def generate(events, backend, group):
 def generate(events, backend, group):
     if group == "root":
     if group == "root":
-        header = "trace-root.h"
+        header = "trace/trace-root.h"
     else:
     else:
         header = "trace.h"
         header = "trace.h"
 
 

+ 1 - 0
scsi/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-scsi.h"

+ 1 - 1
softmmu/balloon.c

@@ -28,7 +28,7 @@
 #include "qemu/atomic.h"
 #include "qemu/atomic.h"
 #include "sysemu/kvm.h"
 #include "sysemu/kvm.h"
 #include "sysemu/balloon.h"
 #include "sysemu/balloon.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/qapi-commands-misc.h"
 #include "qapi/qapi-commands-misc.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"

+ 1 - 1
softmmu/ioport.c

@@ -28,7 +28,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "cpu.h"
 #include "exec/ioport.h"
 #include "exec/ioport.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "exec/memory.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 #include "exec/address-spaces.h"
 
 

+ 1 - 1
softmmu/memory.c

@@ -24,7 +24,7 @@
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "qemu/qemu-print.h"
 #include "qemu/qemu-print.h"
 #include "qom/object.h"
 #include "qom/object.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 
 #include "exec/memory-internal.h"
 #include "exec/memory-internal.h"
 #include "exec/ram_addr.h"
 #include "exec/ram_addr.h"

+ 1 - 1
softmmu/vl.c

@@ -90,7 +90,7 @@
 
 
 #include "disas/disas.h"
 #include "disas/disas.h"
 
 
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "trace/control.h"
 #include "trace/control.h"
 #include "qemu/plugin.h"
 #include "qemu/plugin.h"
 #include "qemu/queue.h"
 #include "qemu/queue.h"

+ 1 - 0
target/arm/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-target_arm.h"

+ 1 - 0
target/hppa/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-target_hppa.h"

+ 1 - 0
target/i386/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-target_i386.h"

+ 1 - 0
target/mips/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-target_mips.h"

+ 1 - 0
target/ppc/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-target_ppc.h"

+ 1 - 0
target/riscv/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-target_riscv.h"

+ 1 - 0
target/s390x/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-target_s390x.h"

+ 1 - 0
target/sparc/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-target_sparc.h"

+ 1 - 1
trace/control-target.c

@@ -9,7 +9,7 @@
 
 
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "cpu.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 #include "trace/control.h"
 #include "trace/control.h"
 
 
 
 

+ 1 - 1
trace/control.c

@@ -27,7 +27,7 @@
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
 #include "monitor/monitor.h"
 #include "monitor/monitor.h"
-#include "trace-root.h"
+#include "trace/trace-root.h"
 
 
 int trace_events_enabled_count;
 int trace_events_enabled_count;
 
 

+ 1 - 0
ui/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-ui.h"

+ 1 - 0
util/trace.h

@@ -0,0 +1 @@
+#include "trace/trace-util.h"