Skip to contentSkip to conversation

Split up the trace-events file

PATCH Superseded Daniel P. Berrange 5 participants 48 messages Jun 9, 2016 – Jun 15, 2016

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Split up the trace-events file

To quote Peter today:

pm215: "trace-events: causing merge conflicts since 2010"

There's really no good reason why we should continue to suffer from this. Even if the trace tool generator can't yet generate multiple independant output files, we can still trivially have multiple independant input files.

This series splits up trace-events so that there is one trace-events file per sub-directory that has tracing events defined. This means that the trace-events files now get assoociated with the subsystem maintainers if you run get_maintainer.pl on a patch. It also means that responsibility for resolving conflicts is now delegated to subsystem maintainers, and overall such conflicts should be much rarer.

Finally, we will likely need this kind of split work done when we do finally get the ability to generate multiple output files, so it is a worthwhile thing to change now regardless.

Daniel P. Berrange (40):
trace: add build framework for merging trace-events files
trace: split out trace events for util/ directory
trace: split out trace events for crypto/ directory
trace: split out trace events for io/ directory
trace: split out trace events for migration/ directory
trace: split out trace events for block/ directory
trace: split out trace events for hw/block/ directory
trace: split out trace events for hw/char/ directory
trace: split out trace events for hw/intc/ directory
trace: split out trace events for hw/net/ directory
trace: split out trace events for hw/virtio/ directory
trace: split out trace events for hw/audio/ directory
trace: split out trace events for hw/misc/ directory
trace: split out trace events for hw/usb/ directory
trace: split out trace events for hw/scsi/ directory
trace: split out trace events for hw/nvram/ directory
trace: split out trace events for hw/display/ directory
trace: split out trace events for hw/input/ directory
trace: split out trace events for hw/timer/ directory
trace: split out trace events for hw/dma/ directory
trace: split out trace events for hw/sparc/ directory
trace: split out trace events for hw/sd/ directory
trace: split out trace events for hw/isa/ directory
trace: split out trace events for hw/i386/ directory
trace: split out trace events for hw/9pfs/ directory
trace: split out trace events for hw/ppc/ directory
trace: split out trace events for hw/pci/ directory
trace: split out trace events for hw/s390x/ directory
trace: split out trace events for hw/vfio/ directory
trace: split out trace events for hw/acpi/ directory
trace: split out trace events for hw/arm/ directory
trace: split out trace events for hw/alpha/ directory
trace: split out trace events for ui/ directory
trace: split out trace events for audio/ directory
trace: split out trace events for net/ directory
trace: split out trace events for target-sparc/ directory
trace: split out trace events for target-s390x/ directory
trace: split out trace events for target-ppc/ directory
trace: split out trace events for qom/ directory
trace: split out trace events for linux-user/ directory

 .gitignore                |    1 +
 Makefile                  |    2 +-
 Makefile.objs             |   43 +
 Makefile.target           |    6 +-
 audio/trace-events        |   42 +
 block/trace-events        |  141 ++++
 crypto/trace-events       |   44 +
 hw/9pfs/trace-events      |   72 ++
 hw/acpi/trace-events      |   43 +
 hw/alpha/trace-events     |   29 +
 hw/arm/trace-events       |   29 +
 hw/audio/trace-events     |   44 +
 hw/block/trace-events     |   42 +
 hw/char/trace-events      |   74 ++
 hw/display/trace-events   |  147 ++++
 hw/dma/trace-events       |   57 ++
 hw/i386/trace-events      |   37 +
 hw/input/trace-events     |   50 ++
 hw/intc/trace-events      |  107 +++
 hw/isa/trace-events       |   34 +
 hw/misc/trace-events      |   77 ++
 hw/net/trace-events       |  297 +++++++
 hw/nvram/trace-events     |   35 +
 hw/pci/trace-events       |   34 +
 hw/ppc/trace-events       |   64 ++
 hw/s390x/trace-events     |   39 +
 hw/scsi/trace-events      |  229 +++++
 hw/sd/trace-events        |   30 +
 hw/sparc/trace-events     |   36 +
 hw/timer/trace-events     |   76 ++
 hw/usb/trace-events       |  293 +++++++
 hw/vfio/trace-events      |  141 ++++
 hw/virtio/trace-events    |   41 +
 io/trace-events           |   88 ++
 linux-user/trace-events   |   37 +
 migration/trace-events    |  233 ++++++
 net/trace-events          |   29 +
 qom/trace-events          |   30 +
 target-ppc/trace-events   |   30 +
 target-s390x/trace-events |   46 +
 target-sparc/trace-events |   53 ++
 trace-events              | 2028 ---------------------------------------------
 trace/Makefile.objs       |   25 +-
 ui/trace-events           |   73 ++
 util/trace-events         |   38 +
 45 files changed, 3103 insertions(+), 2043 deletions(-)
 create mode 100644 audio/trace-events
 create mode 100644 block/trace-events
 create mode 100644 crypto/trace-events
 create mode 100644 hw/9pfs/trace-events
 create mode 100644 hw/acpi/trace-events
 create mode 100644 hw/alpha/trace-events
 create mode 100644 hw/arm/trace-events
 create mode 100644 hw/audio/trace-events
 create mode 100644 hw/block/trace-events
 create mode 100644 hw/char/trace-events
 create mode 100644 hw/display/trace-events
 create mode 100644 hw/dma/trace-events
 create mode 100644 hw/i386/trace-events
 create mode 100644 hw/input/trace-events
 create mode 100644 hw/intc/trace-events
 create mode 100644 hw/isa/trace-events
 create mode 100644 hw/misc/trace-events
 create mode 100644 hw/net/trace-events
 create mode 100644 hw/nvram/trace-events
 create mode 100644 hw/pci/trace-events
 create mode 100644 hw/ppc/trace-events
 create mode 100644 hw/s390x/trace-events
 create mode 100644 hw/scsi/trace-events
 create mode 100644 hw/sd/trace-events
 create mode 100644 hw/sparc/trace-events
 create mode 100644 hw/timer/trace-events
 create mode 100644 hw/usb/trace-events
 create mode 100644 hw/vfio/trace-events
 create mode 100644 hw/virtio/trace-events
 create mode 100644 io/trace-events
 create mode 100644 linux-user/trace-events
 create mode 100644 migration/trace-events
 create mode 100644 net/trace-events
 create mode 100644 qom/trace-events
 create mode 100644 target-ppc/trace-events
 create mode 100644 target-s390x/trace-events
 create mode 100644 target-sparc/trace-events
 create mode 100644 ui/trace-events
 create mode 100644 util/trace-events
Signature · 1 line
2.5.5
#1 lore raw

PATCH 1/40 trace: add build framework for merging trace-events files

Switch make rules over to use trace-events-all as the master trace events input file. Add rule that will construct trace-events-all from $(trace-events-y).

---
 .gitignore          |  1 +
 Makefile            |  2 +-
 Makefile.objs       |  4 ++++
 Makefile.target     |  6 +++---
 trace/Makefile.objs | 25 ++++++++++++++-----------
 5 files changed, 23 insertions(+), 15 deletions(-)
.gitignore +1 -0
index 38ee1c5..9b6a968 100644
@@ -5,6 +5,7 @@
 /config-target.*
 /config.status
 /config-temp
+/trace-events-all
 /trace/generated-tracers.h
 /trace/generated-tracers.c
 /trace/generated-tracers-dtrace.h
Makefile +1 -1
index ed4032a..18da481 100644
@@ -487,7 +487,7 @@ endif
 	set -e; for x in $(KEYMAPS); do \
 		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
 	done
-	$(INSTALL_DATA) $(SRC_PATH)/trace-events "$(DESTDIR)$(qemu_datadir)/trace-events"
+	$(INSTALL_DATA) $(SRC_PATH)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events"
 	for d in $(TARGET_DIRS); do \
 	$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
         done
Makefile.objs +4 -0
index da49b71..697fc66 100644
@@ -115,3 +115,7 @@ qga-vss-dll-obj-y = qga/
 # contrib
 ivshmem-client-obj-y = contrib/ivshmem-client/
 ivshmem-server-obj-y = contrib/ivshmem-server/
+
+
+######################################################################
+trace-events-y = trace-events
Makefile.target +3 -3
index 495b474..d720b3e 100644
@@ -48,7 +48,7 @@ else
 TARGET_TYPE=system
 endif
 
-$(QEMU_PROG).stp-installed: $(SRC_PATH)/trace-events
+$(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace-events-all
 	$(call quiet-command,$(TRACETOOL) \
 		--format=stap \
 		--backends=$(TRACE_BACKENDS) \
@@ -57,7 +57,7 @@ $(QEMU_PROG).stp-installed: $(SRC_PATH)/trace-events
 		--target-type=$(TARGET_TYPE) \
 		< $< > $@,"  GEN   $(TARGET_DIR)$(QEMU_PROG).stp-installed")
 
-$(QEMU_PROG).stp: $(SRC_PATH)/trace-events
+$(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all
 	$(call quiet-command,$(TRACETOOL) \
 		--format=stap \
 		--backends=$(TRACE_BACKENDS) \
@@ -66,7 +66,7 @@ $(QEMU_PROG).stp: $(SRC_PATH)/trace-events
 		--target-type=$(TARGET_TYPE) \
 		< $< > $@,"  GEN   $(TARGET_DIR)$(QEMU_PROG).stp")
 
-$(QEMU_PROG)-simpletrace.stp: $(SRC_PATH)/trace-events
+$(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace-events-all
 	$(call quiet-command,$(TRACETOOL) \
 		--format=simpletrace-stap \
 		--backends=$(TRACE_BACKENDS) \
trace/Makefile.objs +14 -11
index 5145b34..cbe188e 100644
@@ -8,13 +8,16 @@
 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)/%)
+	$(call quiet-command,cat $^ > $@)
+
 ######################################################################
 # 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: $(SRC_PATH)/trace-events $(tracetool-y)
+$(obj)/generated-ust-provider.h-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=ust-events-h \
 		--backends=$(TRACE_BACKENDS) \
@@ -22,7 +25,7 @@ $(obj)/generated-ust-provider.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-
 
 $(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: $(SRC_PATH)/trace-events $(tracetool-y)
+$(obj)/generated-ust.c-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=ust-events-c \
 		--backends=$(TRACE_BACKENDS) \
@@ -37,7 +40,7 @@ endif
 
 $(obj)/generated-events.h: $(obj)/generated-events.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
+$(obj)/generated-events.h-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=events-h \
 		--backends=$(TRACE_BACKENDS) \
@@ -45,7 +48,7 @@ $(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
 
 $(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
+$(obj)/generated-events.c-timestamp: $(BUILD_DIR)/trace-events-all $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=events-c \
 		--backends=$(TRACE_BACKENDS) \
@@ -62,7 +65,7 @@ util-obj-y += generated-events.o
 
 $(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
 	@cmp -s $< $@ || cp $< $@
-$(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+$(obj)/generated-tracers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)/config-host.mak $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=h \
 		--backends=$(TRACE_BACKENDS) \
@@ -73,7 +76,7 @@ $(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/conf
 
 $(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
 	@cmp -s $< $@ || cp $< $@
-$(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+$(obj)/generated-tracers.c-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)/config-host.mak $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=c \
 		--backends=$(TRACE_BACKENDS) \
@@ -90,7 +93,7 @@ $(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.
 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: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+$(obj)/generated-tracers-dtrace.dtrace-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)/config-host.mak $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=d \
 		--backends=$(TRACE_BACKENDS) \
@@ -109,7 +112,7 @@ endif
 
 $(obj)/generated-helpers-wrappers.h: $(obj)/generated-helpers-wrappers.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-helpers-wrappers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+$(obj)/generated-helpers-wrappers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)/config-host.mak $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=tcg-helper-wrapper-h \
 		--backend=$(TRACE_BACKENDS) \
@@ -117,7 +120,7 @@ $(obj)/generated-helpers-wrappers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_
 
 $(obj)/generated-helpers.h: $(obj)/generated-helpers.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+$(obj)/generated-helpers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)/config-host.mak $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=tcg-helper-h \
 		--backend=$(TRACE_BACKENDS) \
@@ -125,7 +128,7 @@ $(obj)/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/conf
 
 $(obj)/generated-helpers.c: $(obj)/generated-helpers.c-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-helpers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+$(obj)/generated-helpers.c-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)/config-host.mak $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=tcg-helper-c \
 		--backend=$(TRACE_BACKENDS) \
@@ -138,7 +141,7 @@ target-obj-y += generated-helpers.o
 
 $(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-$(obj)/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak $(tracetool-y)
+$(obj)/generated-tcg-tracers.h-timestamp: $(BUILD_DIR)/trace-events-all $(BUILD_DIR)/config-host.mak $(tracetool-y)
 	$(call quiet-command,$(TRACETOOL) \
 		--format=tcg-h \
 		--backend=$(TRACE_BACKENDS) \
Signature · 1 line
2.5.5
#2 lore raw

Re: [Qemu-devel] [PATCH v1 01/40] trace: add build framework for merging trace-events files

Quoted 4 lines · Daniel P. Berrange

- $(INSTALL_DATA) $(SRC_PATH)/trace-events
"$(DESTDIR)$(qemu_datadir)/trace-events"
+ $(INSTALL_DATA) $(SRC_PATH)/trace-events-all
"$(DESTDIR)$(qemu_datadir)/trace-events"

$(BUILD_DIR)/trace-events-all ?

cheers,
Gerd

#3 lore raw

Re: [Qemu-devel] [PATCH v1 01/40] trace: add build framework for merging trace-events files

In reply to Daniel P. Berrange

trace/Makefile.objs line 12

Quoted 2 lines · Daniel P. Berrange

+$(BUILD_DIR)/trace-events-all: $(trace-events-y:%=$(SRC_PATH)/%)

trace/Makefile.objs +1 -0
+	$(call quiet-command,cat $^ > $@)

$^ needs to be a stable ordering across make invocations and across machines to avoid thrashing ccache and spuriously renumbering trace event IDs.

I guess it is stable but just in case anyone knows of a case where $^ would change order without any changes to the actual files (e.g. readdir(2) returning things in a different order, make parallel jobs, etc)...

#4 lore raw

Re: [Qemu-devel] [PATCH v1 01/40] trace: add build framework for merging trace-events files

Quoted 8 lines · Stefan Hajnoczi

trace/Makefile.objs line 12

Quoted 2 lines · Daniel P. Berrange

+$(BUILD_DIR)/trace-events-all: $(trace-events-y:%=$(SRC_PATH)/%)

trace/Makefile.objs +1 -0
+	$(call quiet-command,cat $^ > $@)

$^ needs to be a stable ordering across make invocations and across machines to avoid thrashing ccache and spuriously renumbering trace event IDs.

Quoted 4 lines

I guess it is stable but just in case anyone knows of a case where $^ would change order without any changes to the actual files (e.g. readdir(2) returning things in a different order, make parallel jobs, etc)...

As far as I can tell from 'info make', $^ is the list of prerequisites, _in prerequisite order_, minus duplicates. So the only way the order will change is if you edit Makefile, and thus it looks stable to me.

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#5 lore raw

Re: [Qemu-devel] [PATCH v1 01/40] trace: add build framework for merging trace-events files

Quoted 9 lines · Eric Blake
Quoted 8 lines · Stefan Hajnoczi

trace/Makefile.objs line 12

Quoted 2 lines · Daniel P. Berrange

+$(BUILD_DIR)/trace-events-all: $(trace-events-y:%=$(SRC_PATH)/%)

trace/Makefile.objs +1 -0
+	$(call quiet-command,cat $^ > $@)

$^ needs to be a stable ordering across make invocations and across machines to avoid thrashing ccache and spuriously renumbering trace event IDs.

Quoted 8 lines
Quoted 4 lines

I guess it is stable but just in case anyone knows of a case where $^ would change order without any changes to the actual files (e.g. readdir(2) returning things in a different order, make parallel jobs, etc)...

As far as I can tell from 'info make', $^ is the list of prerequisites, _in prerequisite order_, minus duplicates. So the only way the order will change is if you edit Makefile, and thus it looks stable to me.

Thanks for confirming.

Stefan

#6 lore raw

PATCH 2/40 trace: split out trace events for util/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the util/ directory to their own file.

---
 Makefile.objs     |  1 +
 trace-events      | 12 ------------
 util/trace-events | 38 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 12 deletions(-)
 create mode 100644 util/trace-events
Makefile.objs +1 -0
index 697fc66..cd675fd 100644
@@ -119,3 +119,4 @@ ivshmem-server-obj-y = contrib/ivshmem-server/
 
 ######################################################################
 trace-events-y = trace-events
+trace-events-y += util/trace-events
trace-events +0 -12
index 421d89f..b921cc8 100644
@@ -25,13 +25,6 @@
 #
 # The <format-string> should be a sprintf()-compatible format string.
 
-# util/oslib-win32.c
-# util/oslib-posix.c
-qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
-qemu_anon_ram_alloc(size_t size, void *ptr) "size %zu ptr %p"
-qemu_vfree(void *ptr) "ptr %p"
-qemu_anon_ram_free(void *ptr, size_t size) "ptr %p size %zu"
-
 # hw/virtio/virtio.c
 virtqueue_fill(void *vq, const void *elem, unsigned int len, unsigned int idx) "vq %p elem %p len %u idx %u"
 virtqueue_flush(void *vq, unsigned int count) "vq %p count %u"
@@ -1448,11 +1441,6 @@ buffer_move_empty(const char *buf, size_t len, const char *from) "%s: %zd bytes
 buffer_move(const char *buf, size_t len, const char *from) "%s: %zd bytes from %s"
 buffer_free(const char *buf, size_t len) "%s: capacity %zd"
 
-# util/hbitmap.c
-hbitmap_iter_skip_words(const void *hb, void *hbi, uint64_t pos, unsigned long cur) "hb %p hbi %p pos %"PRId64" cur 0x%lx"
-hbitmap_reset(void *hb, uint64_t start, uint64_t count, uint64_t sbit, uint64_t ebit) "hb %p items %"PRIu64",%"PRIu64" bits %"PRIu64"..%"PRIu64
-hbitmap_set(void *hb, uint64_t start, uint64_t count, uint64_t sbit, uint64_t ebit) "hb %p items %"PRIu64",%"PRIu64" bits %"PRIu64"..%"PRIu64
-
 # target-s390x/mmu_helper.c
 get_skeys_nonzero(int rc) "SKEY: Call to get_skeys unexpectedly returned %d"
 set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d"
util/trace-events new file +38 -0
new file mode 100644
index 0000000..95a3b3d
@@ -0,0 +1,38 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# util/oslib-win32.c
+# util/oslib-posix.c
+qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
+qemu_anon_ram_alloc(size_t size, void *ptr) "size %zu ptr %p"
+qemu_vfree(void *ptr) "ptr %p"
+qemu_anon_ram_free(void *ptr, size_t size) "ptr %p size %zu"
+
+# util/hbitmap.c
+hbitmap_iter_skip_words(const void *hb, void *hbi, uint64_t pos, unsigned long cur) "hb %p hbi %p pos %"PRId64" cur 0x%lx"
+hbitmap_reset(void *hb, uint64_t start, uint64_t count, uint64_t sbit, uint64_t ebit) "hb %p items %"PRIu64",%"PRIu64" bits %"PRIu64"..%"PRIu64
+hbitmap_set(void *hb, uint64_t start, uint64_t count, uint64_t sbit, uint64_t ebit) "hb %p items %"PRIu64",%"PRIu64" bits %"PRIu64"..%"PRIu64
Signature · 1 line
2.5.5
#7 lore raw

Re: [Qemu-devel] [PATCH v1 02/40] trace: split out trace events for util/ directory

Quoted 22 lines · Daniel P. Berrange
util/trace-events new file +16 -0
new file mode 100644
index 0000000..95a3b3d
@@ -0,0 +1,38 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#

util/trace-events line 26

Quoted 10 lines
util/trace-events new file +10 -0
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.

Should we just say:

# See docs/trace-events.txt for syntax documentation.

That way we can avoid a lot of boilerplate and this documentation can live in docs/.

#8 lore raw

PATCH 3/40 trace: split out trace events for crypto/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the crypto/ directory to their own file.

---
 Makefile.objs       |  1 +
 crypto/trace-events | 44 ++++++++++++++++++++++++++++++++++++++++++++
 trace-events        | 18 ------------------
 3 files changed, 45 insertions(+), 18 deletions(-)
 create mode 100644 crypto/trace-events
Makefile.objs +1 -0
index cd675fd..c6e915e 100644
@@ -120,3 +120,4 @@ ivshmem-server-obj-y = contrib/ivshmem-server/
 ######################################################################
 trace-events-y = trace-events
 trace-events-y += util/trace-events
+trace-events-y += crypto/trace-events
crypto/trace-events new file +44 -0

44 lines not on this page · raw message

trace-events +0 -18
index b921cc8..2bbef21 100644
@@ -1826,24 +1826,6 @@ alsa_no_frames(int state) "No frames available and ALSA state is %d"
 oss_version(int version) "OSS version = %#x"
 oss_invalid_available_size(int size, int bufsize) "Invalid available size, size=%d bufsize=%d"
 
-# crypto/tlscreds.c
-qcrypto_tls_creds_load_dh(void *creds, const char *filename) "TLS creds load DH creds=%p filename=%s"
-qcrypto_tls_creds_get_path(void *creds, const char *filename, const char *path) "TLS creds path creds=%p filename=%s path=%s"
-
-# crypto/tlscredsanon.c
-qcrypto_tls_creds_anon_load(void *creds, const char *dir) "TLS creds anon load creds=%p dir=%s"
-
-# crypto/tlscredsx509.c
-qcrypto_tls_creds_x509_load(void *creds, const char *dir) "TLS creds x509 load creds=%p dir=%s"
-qcrypto_tls_creds_x509_check_basic_constraints(void *creds, const char *file, int status) "TLS creds x509 check basic constraints creds=%p file=%s status=%d"
-qcrypto_tls_creds_x509_check_key_usage(void *creds, const char *file, int status, int usage, int critical) "TLS creds x509 check key usage creds=%p file=%s status=%d usage=%d critical=%d"
-qcrypto_tls_creds_x509_check_key_purpose(void *creds, const char *file, int status, const char *usage, int critical) "TLS creds x509 check key usage creds=%p file=%s status=%d usage=%s critical=%d"
-qcrypto_tls_creds_x509_load_cert(void *creds, int isServer, const char *file) "TLS creds x509 load cert creds=%p isServer=%d file=%s"
-qcrypto_tls_creds_x509_load_cert_list(void *creds, const char *file) "TLS creds x509 load cert list creds=%p file=%s"
-
-# crypto/tlssession.c
-qcrypto_tls_session_new(void *session, void *creds, const char *hostname, const char *aclname, int endpoint) "TLS session new session=%p creds=%p hostname=%s aclname=%s endpoint=%d"
-
 # net/vhost-user.c
 vhost_user_event(const char *chr, int event) "chr: %s got event: %d"
 
Signature · 1 line
2.5.5
#9 lore raw

PATCH 4/40 trace: split out trace events for io/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the io/ directory to their own file.

---
 Makefile.objs   |  1 +
 io/trace-events | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events    | 62 ----------------------------------------
 3 files changed, 89 insertions(+), 62 deletions(-)
 create mode 100644 io/trace-events
Makefile.objs +1 -0
index c6e915e..7577dca 100644
@@ -121,3 +121,4 @@ ivshmem-server-obj-y = contrib/ivshmem-server/
 trace-events-y = trace-events
 trace-events-y += util/trace-events
 trace-events-y += crypto/trace-events
+trace-events-y += io/trace-events
io/trace-events new file +88 -0

88 lines not on this page · raw message

trace-events +0 -62

74 lines not on this page · raw message

Signature · 1 line
2.5.5
#10 lore raw

PATCH 5/40 trace: split out trace events for migration/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the migration/ directory to their own file.

---
 Makefile.objs          |   1 +
 migration/trace-events | 233 +++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events           | 207 -------------------------------------------
 3 files changed, 234 insertions(+), 207 deletions(-)
 create mode 100644 migration/trace-events
Makefile.objs +1 -0
index 7577dca..744446d 100644
@@ -122,3 +122,4 @@ 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-y += migration/trace-events
migration/trace-events new file +233 -0

233 lines not on this page · raw message

trace-events +0 -207

219 lines not on this page · raw message

Signature · 1 line
2.5.5
#11 lore raw

PATCH 6/40 trace: split out trace events for block/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the block/ directory to their own file.

---
 Makefile.objs      |   1 +
 block/trace-events | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events       | 115 -------------------------------------------
 3 files changed, 142 insertions(+), 115 deletions(-)
 create mode 100644 block/trace-events
Makefile.objs +1 -0
index 744446d..998f356 100644
@@ -123,3 +123,4 @@ trace-events-y += util/trace-events
 trace-events-y += crypto/trace-events
 trace-events-y += io/trace-events
 trace-events-y += migration/trace-events
+trace-events-y += block/trace-events
block/trace-events new file +141 -0

141 lines not on this page · raw message

trace-events +0 -115

133 lines not on this page · raw message

Signature · 1 line
2.5.5
#12 lore raw

PATCH 7/40 trace: split out trace events for hw/block/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/block/ directory to their own file.

---
 Makefile.objs         |  1 +
 hw/block/trace-events | 42 ++++++++++++++++++++++++++++++++++++++++++
 trace-events          | 16 ----------------
 3 files changed, 43 insertions(+), 16 deletions(-)
 create mode 100644 hw/block/trace-events
Makefile.objs +1 -0
index 998f356..7c1da65 100644
@@ -124,3 +124,4 @@ trace-events-y += crypto/trace-events
 trace-events-y += io/trace-events
 trace-events-y += migration/trace-events
 trace-events-y += block/trace-events
+trace-events-y += hw/block/trace-events
hw/block/trace-events new file +42 -0

42 lines not on this page · raw message

trace-events +0 -16
index 2002ea5..fd343ef 100644
@@ -50,18 +50,6 @@ virtio_console_flush_buf(unsigned int port, size_t len, ssize_t ret) "port %u, i
 virtio_console_chr_read(unsigned int port, int size) "port %u, size %d"
 virtio_console_chr_event(unsigned int port, int event) "port %u, event %d"
 
-# hw/block/virtio-blk.c
-virtio_blk_req_complete(void *req, int status) "req %p status %d"
-virtio_blk_rw_complete(void *req, int ret) "req %p ret %d"
-virtio_blk_handle_write(void *req, uint64_t sector, size_t nsectors) "req %p sector %"PRIu64" nsectors %zu"
-virtio_blk_handle_read(void *req, uint64_t sector, size_t nsectors) "req %p sector %"PRIu64" nsectors %zu"
-virtio_blk_submit_multireq(void *mrb, int start, int num_reqs, uint64_t offset, size_t size, bool is_write) "mrb %p start %d num_reqs %d offset %"PRIu64" size %zu is_write %d"
-
-# hw/block/dataplane/virtio-blk.c
-virtio_blk_data_plane_start(void *s) "dataplane %p"
-virtio_blk_data_plane_stop(void *s) "dataplane %p"
-virtio_blk_data_plane_process_request(void *s, unsigned int out_num, unsigned int in_num, unsigned int head) "dataplane %p out_num %u in_num %u head %u"
-
 # thread-pool.c
 thread_pool_submit(void *pool, void *req, void *opaque) "pool %p req %p opaque %p"
 thread_pool_complete(void *pool, void *req, void *opaque, int ret) "pool %p req %p opaque %p ret %d"
@@ -128,10 +116,6 @@ fw_cfg_select(void *s, uint16_t key, int ret) "%p key %d = %d"
 fw_cfg_read(void *s, uint64_t ret) "%p = %"PRIx64
 fw_cfg_add_file(void *s, int index, char *name, size_t len) "%p #%d: %s (%zd bytes)"
 
-# hw/block/hd-geometry.c
-hd_geometry_lchs_guess(void *blk, int cyls, int heads, int secs) "blk %p LCHS %d %d %d"
-hd_geometry_guess(void *blk, uint32_t cyls, uint32_t heads, uint32_t secs, int trans) "blk %p CHS %u %u %u trans %d"
-
 # hw/display/jazz_led.c
 jazz_led_read(uint64_t addr, uint8_t val) "read addr=0x%"PRIx64": 0x%x"
 jazz_led_write(uint64_t addr, uint8_t new) "write addr=0x%"PRIx64": 0x%x"
Signature · 1 line
2.5.5
#13 lore raw

PATCH 8/40 trace: split out trace events for hw/char/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/char/ directory to their own file.

---
 Makefile.objs        |  1 +
 hw/char/trace-events | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events         | 48 ----------------------------------
 3 files changed, 75 insertions(+), 48 deletions(-)
 create mode 100644 hw/char/trace-events
Makefile.objs +1 -0
index 7c1da65..8c7d8a9 100644
@@ -125,3 +125,4 @@ trace-events-y += io/trace-events
 trace-events-y += migration/trace-events
 trace-events-y += block/trace-events
 trace-events-y += hw/block/trace-events
+trace-events-y += hw/char/trace-events
hw/char/trace-events new file +74 -0

74 lines not on this page · raw message

trace-events +0 -48

84 lines not on this page · raw message

Signature · 1 line
2.5.5
#14 lore raw

PATCH 9/40 trace: split out trace events for hw/intc/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/intc/ directory to their own file.

---
 Makefile.objs        |   1 +
 hw/intc/trace-events | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events         |  81 --------------------------------------
 3 files changed, 108 insertions(+), 81 deletions(-)
 create mode 100644 hw/intc/trace-events
Makefile.objs +1 -0
index 8c7d8a9..8560df4 100644
@@ -126,3 +126,4 @@ trace-events-y += migration/trace-events
 trace-events-y += block/trace-events
 trace-events-y += hw/block/trace-events
 trace-events-y += hw/char/trace-events
+trace-events-y += hw/intc/trace-events
hw/intc/trace-events new file +107 -0

107 lines not on this page · raw message

trace-events +0 -81

123 lines not on this page · raw message

Signature · 1 line
2.5.5
#15 lore raw

PATCH 10/40 trace: split out trace events for hw/net/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/net/ directory to their own file.

---
 Makefile.objs       |   1 +
 hw/net/trace-events | 297 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events        | 271 -----------------------------------------------
 3 files changed, 298 insertions(+), 271 deletions(-)
 create mode 100644 hw/net/trace-events
Makefile.objs +1 -0
index 8560df4..867c135 100644
@@ -127,3 +127,4 @@ trace-events-y += block/trace-events
 trace-events-y += hw/block/trace-events
 trace-events-y += hw/char/trace-events
 trace-events-y += hw/intc/trace-events
+trace-events-y += hw/net/trace-events
hw/net/trace-events new file +297 -0

297 lines not on this page · raw message

trace-events +0 -271

304 lines not on this page · raw message

Signature · 1 line
2.5.5
#16 lore raw

PATCH 11/40 trace: split out trace events for hw/virtio/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/virtio/ directory to their own file.

---
 Makefile.objs          |  1 +
 hw/virtio/trace-events | 41 +++++++++++++++++++++++++++++++++++++++++
 trace-events           | 14 --------------
 3 files changed, 42 insertions(+), 14 deletions(-)
 create mode 100644 hw/virtio/trace-events
Makefile.objs +1 -0
index 867c135..165475c 100644
@@ -128,3 +128,4 @@ trace-events-y += hw/block/trace-events
 trace-events-y += hw/char/trace-events
 trace-events-y += hw/intc/trace-events
 trace-events-y += hw/net/trace-events
+trace-events-y += hw/virtio/trace-events
hw/virtio/trace-events new file +41 -0

41 lines not on this page · raw message

trace-events +0 -14
index 1792f2b..8e8de59 100644
@@ -25,20 +25,6 @@
 #
 # The <format-string> should be a sprintf()-compatible format string.
 
-# hw/virtio/virtio.c
-virtqueue_fill(void *vq, const void *elem, unsigned int len, unsigned int idx) "vq %p elem %p len %u idx %u"
-virtqueue_flush(void *vq, unsigned int count) "vq %p count %u"
-virtqueue_pop(void *vq, void *elem, unsigned int in_num, unsigned int out_num) "vq %p elem %p in_num %u out_num %u"
-virtio_queue_notify(void *vdev, int n, void *vq) "vdev %p n %d vq %p"
-virtio_irq(void *vq) "vq %p"
-virtio_notify(void *vdev, void *vq) "vdev %p vq %p"
-virtio_set_status(void *vdev, uint8_t val) "vdev %p val %u"
-
-# hw/virtio/virtio-rng.c
-virtio_rng_guest_not_ready(void *rng) "rng %p: guest not ready"
-virtio_rng_pushed(void *rng, size_t len) "rng %p: %zd bytes pushed"
-virtio_rng_request(void *rng, size_t size, unsigned quota) "rng %p: %zd bytes requested, %u bytes quota left"
-
 # thread-pool.c
 thread_pool_submit(void *pool, void *req, void *opaque) "pool %p req %p opaque %p"
 thread_pool_complete(void *pool, void *req, void *opaque, int ret) "pool %p req %p opaque %p ret %d"
Signature · 1 line
2.5.5
#17 lore raw

PATCH 12/40 trace: split out trace events for hw/audio/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/audio/ directory to their own file.

---
 Makefile.objs         |  1 +
 hw/audio/trace-events | 44 ++++++++++++++++++++++++++++++++++++++++++++
 trace-events          | 18 ------------------
 3 files changed, 45 insertions(+), 18 deletions(-)
 create mode 100644 hw/audio/trace-events
Makefile.objs +1 -0
index 165475c..9d5f64d 100644
@@ -129,3 +129,4 @@ trace-events-y += hw/char/trace-events
 trace-events-y += hw/intc/trace-events
 trace-events-y += hw/net/trace-events
 trace-events-y += hw/virtio/trace-events
+trace-events-y += hw/audio/trace-events
hw/audio/trace-events new file +44 -0

44 lines not on this page · raw message

trace-events +0 -18
index 8e8de59..94f8f70 100644
@@ -42,12 +42,6 @@ virtio_balloon_get_config(uint32_t num_pages, uint32_t actual) "num_pages: %d ac
 virtio_balloon_set_config(uint32_t actual, uint32_t oldactual) "actual: %d oldactual: %d"
 virtio_balloon_to_target(uint64_t target, uint32_t num_pages) "balloon target: %"PRIx64" num_pages: %d"
 
-# hw/audio/cs4231.c
-cs4231_mem_readl_dreg(uint32_t reg, uint32_t ret) "read dreg %d: 0x%02x"
-cs4231_mem_readl_reg(uint32_t reg, uint32_t ret) "read reg %d: 0x%08x"
-cs4231_mem_writel_reg(uint32_t reg, uint32_t old, uint32_t val) "write reg %d: 0x%08x -> 0x%08x"
-cs4231_mem_writel_dreg(uint32_t reg, uint32_t old, uint32_t val) "write dreg %d: 0x%02x -> 0x%02x"
-
 # hw/nvram/ds1225y.c
 nvram_read(uint32_t addr, uint32_t ret) "read addr %d: 0x%02x"
 nvram_write(uint32_t addr, uint32_t old, uint32_t val) "write addr %d: 0x%02x -> 0x%02x"
@@ -595,18 +589,6 @@ megasas_mmio_invalid_readl(unsigned long addr) "addr 0x%lx"
 megasas_mmio_writel(const char *reg, uint32_t val) "reg %s: 0x%x"
 megasas_mmio_invalid_writel(uint32_t addr, uint32_t val) "addr 0x%x: 0x%x"
 
-# hw/audio/milkymist-ac97.c
-milkymist_ac97_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x"
-milkymist_ac97_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x"
-milkymist_ac97_pulse_irq_crrequest(void) "Pulse IRQ CR request"
-milkymist_ac97_pulse_irq_crreply(void) "Pulse IRQ CR reply"
-milkymist_ac97_pulse_irq_dmaw(void) "Pulse IRQ DMA write"
-milkymist_ac97_pulse_irq_dmar(void) "Pulse IRQ DMA read"
-milkymist_ac97_in_cb(int avail, uint32_t remaining) "avail %d remaining %u"
-milkymist_ac97_in_cb_transferred(int transferred) "transferred %d"
-milkymist_ac97_out_cb(int free, uint32_t remaining) "free %d remaining %u"
-milkymist_ac97_out_cb_transferred(int transferred) "transferred %d"
-
 # hw/misc/milkymist-hpdmc.c
 milkymist_hpdmc_memory_read(uint32_t addr, uint32_t value) "addr=%08x value=%08x"
 milkymist_hpdmc_memory_write(uint32_t addr, uint32_t value) "addr=%08x value=%08x"
Signature · 1 line
2.5.5
#18 lore raw

PATCH 13/40 trace: split out trace events for hw/misc/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/misc/ directory to their own file.

---
 Makefile.objs        |  1 +
 hw/misc/trace-events | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events         | 51 ----------------------------------
 3 files changed, 78 insertions(+), 51 deletions(-)
 create mode 100644 hw/misc/trace-events
Makefile.objs +1 -0
index 9d5f64d..4f0ccbe 100644
@@ -130,3 +130,4 @@ trace-events-y += hw/intc/trace-events
 trace-events-y += hw/net/trace-events
 trace-events-y += hw/virtio/trace-events
 trace-events-y += hw/audio/trace-events
+trace-events-y += hw/misc/trace-events
hw/misc/trace-events new file +77 -0

77 lines not on this page · raw message

trace-events +0 -51

73 lines not on this page · raw message

Signature · 1 line
2.5.5
#19 lore raw

PATCH 14/40 trace: split out trace events for hw/usb/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/usb/ directory to their own file.

---
 Makefile.objs       |   1 +
 hw/usb/trace-events | 293 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events        | 267 -----------------------------------------------
 3 files changed, 294 insertions(+), 267 deletions(-)
 create mode 100644 hw/usb/trace-events
Makefile.objs +1 -0
index 4f0ccbe..e0e6084 100644
@@ -131,3 +131,4 @@ trace-events-y += hw/net/trace-events
 trace-events-y += hw/virtio/trace-events
 trace-events-y += hw/audio/trace-events
 trace-events-y += hw/misc/trace-events
+trace-events-y += hw/usb/trace-events
hw/usb/trace-events new file +293 -0

293 lines not on this page · raw message

trace-events +0 -267

273 lines not on this page · raw message

Signature · 1 line
2.5.5
#20 lore raw

PATCH 15/40 trace: split out trace events for hw/scsi/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/scsi/ directory to their own file.

---
 Makefile.objs        |   1 +
 hw/scsi/trace-events | 229 +++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events         | 203 ---------------------------------------------
 3 files changed, 230 insertions(+), 203 deletions(-)
 create mode 100644 hw/scsi/trace-events
Makefile.objs +1 -0
index e0e6084..06fb4af 100644
@@ -132,3 +132,4 @@ trace-events-y += hw/virtio/trace-events
 trace-events-y += hw/audio/trace-events
 trace-events-y += hw/misc/trace-events
 trace-events-y += hw/usb/trace-events
+trace-events-y += hw/scsi/trace-events
hw/scsi/trace-events new file +229 -0

229 lines not on this page · raw message

trace-events +0 -203

227 lines not on this page · raw message

Signature · 1 line
2.5.5
#21 lore raw

PATCH 16/40 trace: split out trace events for hw/nvram/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/nvram/ directory to their own file.

---
 Makefile.objs         |  1 +
 hw/nvram/trace-events | 35 +++++++++++++++++++++++++++++++++++
 trace-events          |  9 ---------
 3 files changed, 36 insertions(+), 9 deletions(-)
 create mode 100644 hw/nvram/trace-events
Makefile.objs +1 -0
index 06fb4af..f299ecf 100644
@@ -133,3 +133,4 @@ trace-events-y += hw/audio/trace-events
 trace-events-y += hw/misc/trace-events
 trace-events-y += hw/usb/trace-events
 trace-events-y += hw/scsi/trace-events
+trace-events-y += hw/nvram/trace-events
hw/nvram/trace-events new file +35 -0
new file mode 100644
index 0000000..d4583da
@@ -0,0 +1,35 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# hw/nvram/ds1225y.c
+nvram_read(uint32_t addr, uint32_t ret) "read addr %d: 0x%02x"
+nvram_write(uint32_t addr, uint32_t old, uint32_t val) "write addr %d: 0x%02x -> 0x%02x"
+
+# hw/nvram/fw_cfg.c
+fw_cfg_select(void *s, uint16_t key, int ret) "%p key %d = %d"
+fw_cfg_read(void *s, uint64_t ret) "%p = %"PRIx64
+fw_cfg_add_file(void *s, int index, char *name, size_t len) "%p #%d: %s (%zd bytes)"
trace-events +0 -9
index 99a7fa5..f158fbe 100644
@@ -42,15 +42,6 @@ virtio_balloon_get_config(uint32_t num_pages, uint32_t actual) "num_pages: %d ac
 virtio_balloon_set_config(uint32_t actual, uint32_t oldactual) "actual: %d oldactual: %d"
 virtio_balloon_to_target(uint64_t target, uint32_t num_pages) "balloon target: %"PRIx64" num_pages: %d"
 
-# hw/nvram/ds1225y.c
-nvram_read(uint32_t addr, uint32_t ret) "read addr %d: 0x%02x"
-nvram_write(uint32_t addr, uint32_t old, uint32_t val) "write addr %d: 0x%02x -> 0x%02x"
-
-# hw/nvram/fw_cfg.c
-fw_cfg_select(void *s, uint16_t key, int ret) "%p key %d = %d"
-fw_cfg_read(void *s, uint64_t ret) "%p = %"PRIx64
-fw_cfg_add_file(void *s, int index, char *name, size_t len) "%p #%d: %s (%zd bytes)"
-
 # hw/display/jazz_led.c
 jazz_led_read(uint64_t addr, uint8_t val) "read addr=0x%"PRIx64": 0x%x"
 jazz_led_write(uint64_t addr, uint8_t new) "write addr=0x%"PRIx64": 0x%x"
Signature · 1 line
2.5.5
#22 lore raw

PATCH 17/40 trace: split out trace events for hw/display/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/display/ directory to their own file.

---
 Makefile.objs           |   1 +
 hw/display/trace-events | 147 ++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events            | 121 ---------------------------------------
 3 files changed, 148 insertions(+), 121 deletions(-)
 create mode 100644 hw/display/trace-events
Makefile.objs +1 -0
index f299ecf..d9c98d9 100644
@@ -134,3 +134,4 @@ trace-events-y += hw/misc/trace-events
 trace-events-y += hw/usb/trace-events
 trace-events-y += hw/scsi/trace-events
 trace-events-y += hw/nvram/trace-events
+trace-events-y += hw/display/trace-events
hw/display/trace-events new file +147 -0

147 lines not on this page · raw message

trace-events +0 -121

151 lines not on this page · raw message

Signature · 1 line
2.5.5
#23 lore raw

PATCH 18/40 trace: split out trace events for hw/input/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/input/ directory to their own file.

---
 Makefile.objs         |  1 +
 hw/input/trace-events | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events          | 24 ------------------------
 3 files changed, 51 insertions(+), 24 deletions(-)
 create mode 100644 hw/input/trace-events
Makefile.objs +1 -0
index d9c98d9..5025512 100644
@@ -135,3 +135,4 @@ trace-events-y += hw/usb/trace-events
 trace-events-y += hw/scsi/trace-events
 trace-events-y += hw/nvram/trace-events
 trace-events-y += hw/display/trace-events
+trace-events-y += hw/input/trace-events
hw/input/trace-events new file +50 -0

50 lines not on this page · raw message

trace-events +0 -24
index 5c1cdee..33ee352 100644
@@ -42,23 +42,6 @@ virtio_balloon_get_config(uint32_t num_pages, uint32_t actual) "num_pages: %d ac
 virtio_balloon_set_config(uint32_t actual, uint32_t oldactual) "actual: %d oldactual: %d"
 virtio_balloon_to_target(uint64_t target, uint32_t num_pages) "balloon target: %"PRIx64" num_pages: %d"
 
-# hw/input/ps2.c
-ps2_put_keycode(void *opaque, int keycode) "%p keycode %d"
-ps2_read_data(void *opaque) "%p"
-ps2_set_ledstate(void *s, int ledstate) "%p ledstate %d"
-ps2_reset_keyboard(void *s) "%p"
-ps2_write_keyboard(void *opaque, int val) "%p val %d"
-ps2_keyboard_set_translation(void *opaque, int mode) "%p mode %d"
-ps2_mouse_send_packet(void *s, int dx1, int dy1, int dz1, int b) "%p x %d y %d z %d bs %#x"
-ps2_mouse_event_disabled(void *opaque, int dx, int dy, int dz, int buttons_state, int mouse_dx, int mouse_dy, int mouse_dz) "%p x %d y %d z %d bs %#x mx %d my %d mz %d "
-ps2_mouse_event(void *opaque, int dx, int dy, int dz, int buttons_state, int mouse_dx, int mouse_dy, int mouse_dz) "%p x %d y %d z %d bs %#x mx %d my %d mz %d "
-ps2_mouse_fake_event(void *opaque) "%p"
-ps2_write_mouse(void *opaque, int val) "%p val %d"
-ps2_kbd_reset(void *opaque) "%p"
-ps2_mouse_reset(void *opaque) "%p"
-ps2_kbd_init(void *s) "%p"
-ps2_mouse_init(void *s) "%p"
-
 # hw/timer/slavio_timer.c
 slavio_timer_get_out(uint64_t limit, uint32_t counthigh, uint32_t count) "limit %"PRIx64" count %x%08x"
 slavio_timer_irq(uint32_t counthigh, uint32_t count) "callback: count %x%08x"
@@ -146,13 +129,6 @@ lm32_timer_irq_state(int level) "irq state %d"
 milkymist_memcard_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x"
 milkymist_memcard_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x"
 
-# hw/input/milkymist-softusb.c
-milkymist_softusb_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x"
-milkymist_softusb_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x"
-milkymist_softusb_mevt(uint8_t m) "m %d"
-milkymist_softusb_kevt(uint8_t m) "m %d"
-milkymist_softusb_pulse_irq(void) "Pulse IRQ"
-
 # hw/timer/milkymist-sysctl.c
 milkymist_sysctl_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x"
 milkymist_sysctl_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x"
Signature · 1 line
2.5.5
#24 lore raw

PATCH 19/40 trace: split out trace events for hw/timer/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/timer/ directory to their own file.

---
 Makefile.objs         |  1 +
 hw/timer/trace-events | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events          | 50 ---------------------------------
 3 files changed, 77 insertions(+), 50 deletions(-)
 create mode 100644 hw/timer/trace-events
Makefile.objs +1 -0
index 5025512..fbd8454 100644
@@ -136,3 +136,4 @@ trace-events-y += hw/scsi/trace-events
 trace-events-y += hw/nvram/trace-events
 trace-events-y += hw/display/trace-events
 trace-events-y += hw/input/trace-events
+trace-events-y += hw/timer/trace-events
hw/timer/trace-events new file +76 -0

76 lines not on this page · raw message

trace-events +0 -50

75 lines not on this page · raw message

Signature · 1 line
2.5.5
#25 lore raw

PATCH 20/40 trace: split out trace events for hw/dma/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/dma/ directory to their own file.

---
 Makefile.objs       |  1 +
 hw/dma/trace-events | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events        | 31 -----------------------------
 3 files changed, 58 insertions(+), 31 deletions(-)
 create mode 100644 hw/dma/trace-events
Makefile.objs +1 -0
index fbd8454..b05f290 100644
@@ -137,3 +137,4 @@ trace-events-y += hw/nvram/trace-events
 trace-events-y += hw/display/trace-events
 trace-events-y += hw/input/trace-events
 trace-events-y += hw/timer/trace-events
+trace-events-y += hw/dma/trace-events
hw/dma/trace-events new file +57 -0

57 lines not on this page · raw message

trace-events +0 -31
index 1bde21b..a47fc4b 100644
@@ -42,40 +42,12 @@ virtio_balloon_get_config(uint32_t num_pages, uint32_t actual) "num_pages: %d ac
 virtio_balloon_set_config(uint32_t actual, uint32_t oldactual) "actual: %d oldactual: %d"
 virtio_balloon_to_target(uint64_t target, uint32_t num_pages) "balloon target: %"PRIx64" num_pages: %d"
 
-# hw/dma/rc4030.c
-jazzio_read(uint64_t addr, uint32_t ret) "read reg[0x%"PRIx64"] = 0x%x"
-jazzio_write(uint64_t addr, uint32_t val) "write reg[0x%"PRIx64"] = 0x%x"
-rc4030_read(uint64_t addr, uint32_t ret) "read reg[0x%"PRIx64"] = 0x%x"
-rc4030_write(uint64_t addr, uint32_t val) "write reg[0x%"PRIx64"] = 0x%x"
-
-# hw/dma/sparc32_dma.c
-ledma_memory_read(uint64_t addr) "DMA read addr 0x%"PRIx64
-ledma_memory_write(uint64_t addr) "DMA write addr 0x%"PRIx64
-sparc32_dma_set_irq_raise(void) "Raise IRQ"
-sparc32_dma_set_irq_lower(void) "Lower IRQ"
-espdma_memory_read(uint32_t addr) "DMA read addr 0x%08x"
-espdma_memory_write(uint32_t addr) "DMA write addr 0x%08x"
-sparc32_dma_mem_readl(uint64_t addr, uint32_t ret) "read dmareg %"PRIx64": 0x%08x"
-sparc32_dma_mem_writel(uint64_t addr, uint32_t old, uint32_t val) "write dmareg %"PRIx64": 0x%08x -> 0x%08x"
-sparc32_dma_enable_raise(void) "Raise DMA enable"
-sparc32_dma_enable_lower(void) "Lower DMA enable"
-
 # hw/sparc/sun4m.c
 sun4m_cpu_interrupt(unsigned int level) "Set CPU IRQ %d"
 sun4m_cpu_reset_interrupt(unsigned int level) "Reset CPU IRQ %d"
 sun4m_cpu_set_irq_raise(int level) "Raise CPU IRQ %d"
 sun4m_cpu_set_irq_lower(int level) "Lower CPU IRQ %d"
 
-# hw/dma/sun4m_iommu.c
-sun4m_iommu_mem_readl(uint64_t addr, uint32_t ret) "read reg[%"PRIx64"] = %x"
-sun4m_iommu_mem_writel(uint64_t addr, uint32_t val) "write reg[%"PRIx64"] = %x"
-sun4m_iommu_mem_writel_ctrl(uint64_t iostart) "iostart = %"PRIx64
-sun4m_iommu_mem_writel_tlbflush(uint32_t val) "tlb flush %x"
-sun4m_iommu_mem_writel_pgflush(uint32_t val) "page flush %x"
-sun4m_iommu_page_get_flags(uint64_t pa, uint64_t iopte, uint32_t ret) "get flags addr %"PRIx64" => pte %"PRIx64", *pte = %x"
-sun4m_iommu_translate_pa(uint64_t addr, uint64_t pa, uint32_t iopte) "xlate dva %"PRIx64" => pa %"PRIx64" iopte = %x"
-sun4m_iommu_bad_addr(uint64_t addr) "bad addr %"PRIx64
-
 # vl.c
 vm_state_notify(int running, int reason) "running %d reason %d"
 load_file(const char *name, const char *path) "name %s location %s"
@@ -533,9 +505,6 @@ kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
 kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s"
 kvm_sigp_finished(uint8_t order, int cpu_index, int dst_index, int cc) "SIGP: Finished order %u on cpu %d -> cpu %d with cc=%d"
 
-# hw/dma/i8257.c
-i8257_unregistered_dma(int nchan, int dma_pos, int dma_len) "unregistered DMA channel used nchan=%d dma_pos=%d dma_len=%d"
-
 # target-s390x/cpu.c
 cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
 cpu_halt(int cpu_index) "halting cpu %d"
Signature · 1 line
2.5.5
#26 lore raw

PATCH 21/40 trace: split out trace events for hw/sparc/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/sparc/ directory to their own file.

---
 Makefile.objs         |  1 +
 hw/sparc/trace-events | 36 ++++++++++++++++++++++++++++++++++++
 trace-events          | 10 ----------
 3 files changed, 37 insertions(+), 10 deletions(-)
 create mode 100644 hw/sparc/trace-events
Makefile.objs +1 -0
index b05f290..e435e84 100644
@@ -138,3 +138,4 @@ trace-events-y += hw/display/trace-events
 trace-events-y += hw/input/trace-events
 trace-events-y += hw/timer/trace-events
 trace-events-y += hw/dma/trace-events
+trace-events-y += hw/sparc/trace-events
hw/sparc/trace-events new file +36 -0
new file mode 100644
index 0000000..3803e16
@@ -0,0 +1,36 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# hw/sparc/sun4m.c
+sun4m_cpu_interrupt(unsigned int level) "Set CPU IRQ %d"
+sun4m_cpu_reset_interrupt(unsigned int level) "Reset CPU IRQ %d"
+sun4m_cpu_set_irq_raise(int level) "Raise CPU IRQ %d"
+sun4m_cpu_set_irq_lower(int level) "Lower CPU IRQ %d"
+
+# hw/sparc/leon3.c
+leon3_set_irq(int intno) "Set CPU IRQ %d"
+leon3_reset_irq(int intno) "Reset CPU IRQ %d"
trace-events +0 -10
index a47fc4b..8392995 100644
@@ -42,12 +42,6 @@ virtio_balloon_get_config(uint32_t num_pages, uint32_t actual) "num_pages: %d ac
 virtio_balloon_set_config(uint32_t actual, uint32_t oldactual) "actual: %d oldactual: %d"
 virtio_balloon_to_target(uint64_t target, uint32_t num_pages) "balloon target: %"PRIx64" num_pages: %d"
 
-# hw/sparc/sun4m.c
-sun4m_cpu_interrupt(unsigned int level) "Set CPU IRQ %d"
-sun4m_cpu_reset_interrupt(unsigned int level) "Reset CPU IRQ %d"
-sun4m_cpu_set_irq_raise(int level) "Raise CPU IRQ %d"
-sun4m_cpu_set_irq_lower(int level) "Lower CPU IRQ %d"
-
 # vl.c
 vm_state_notify(int running, int reason) "running %d reason %d"
 load_file(const char *name, const char *path) "name %s location %s"
@@ -56,10 +50,6 @@ system_wakeup_request(int reason) "reason=%d"
 qemu_system_shutdown_request(void) ""
 qemu_system_powerdown_request(void) ""
 
-# hw/sparc/leon3.c
-leon3_set_irq(int intno) "Set CPU IRQ %d"
-leon3_reset_irq(int intno) "Reset CPU IRQ %d"
-
 # spice-qemu-char.c
 spice_vmc_write(ssize_t out, int len) "spice wrottn %zd of requested %d"
 spice_vmc_read(int bytes, int len) "spice read %d of requested %d"
Signature · 1 line
2.5.5
#27 lore raw

PATCH 22/40 trace: split out trace events for hw/sd/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/sd/ directory to their own file.

---
 Makefile.objs      |  1 +
 hw/sd/trace-events | 30 ++++++++++++++++++++++++++++++
 trace-events       |  4 ----
 3 files changed, 31 insertions(+), 4 deletions(-)
 create mode 100644 hw/sd/trace-events
Makefile.objs +1 -0
index e435e84..175af1c 100644
@@ -139,3 +139,4 @@ trace-events-y += hw/input/trace-events
 trace-events-y += hw/timer/trace-events
 trace-events-y += hw/dma/trace-events
 trace-events-y += hw/sparc/trace-events
+trace-events-y += hw/sd/trace-events
hw/sd/trace-events new file +30 -0
new file mode 100644
index 0000000..b868972
@@ -0,0 +1,30 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# hw/sd/milkymist-memcard.c
+milkymist_memcard_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x"
+milkymist_memcard_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x"
trace-events +0 -4
index 8392995..1ac1285 100644
@@ -57,10 +57,6 @@ spice_vmc_register_interface(void *scd) "spice vmc registered interface %p"
 spice_vmc_unregister_interface(void *scd) "spice vmc unregistered interface %p"
 spice_vmc_event(int event) "spice vmc event %d"
 
-# hw/sd/milkymist-memcard.c
-milkymist_memcard_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x"
-milkymist_memcard_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x"
-
 # hw/isa/pc87312.c
 pc87312_io_read(uint32_t addr, uint32_t val) "read addr=%x val=%x"
 pc87312_io_write(uint32_t addr, uint32_t val) "write addr=%x val=%x"
Signature · 1 line
2.5.5
#28 lore raw

PATCH 23/40 trace: split out trace events for hw/isa/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/isa/ directory to their own file.

---
 Makefile.objs       |  1 +
 hw/isa/trace-events | 34 ++++++++++++++++++++++++++++++++++
 trace-events        |  8 --------
 3 files changed, 35 insertions(+), 8 deletions(-)
 create mode 100644 hw/isa/trace-events
Makefile.objs +1 -0
index 175af1c..764e6fd 100644
@@ -140,3 +140,4 @@ trace-events-y += hw/timer/trace-events
 trace-events-y += hw/dma/trace-events
 trace-events-y += hw/sparc/trace-events
 trace-events-y += hw/sd/trace-events
+trace-events-y += hw/isa/trace-events
hw/isa/trace-events new file +34 -0
new file mode 100644
index 0000000..11dd2e9
@@ -0,0 +1,34 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# hw/isa/pc87312.c
+pc87312_io_read(uint32_t addr, uint32_t val) "read addr=%x val=%x"
+pc87312_io_write(uint32_t addr, uint32_t val) "write addr=%x val=%x"
+pc87312_info_floppy(uint32_t base) "base 0x%x"
+pc87312_info_ide(uint32_t base) "base 0x%x"
+pc87312_info_parallel(uint32_t base, uint32_t irq) "base 0x%x, irq %u"
+pc87312_info_serial(int n, uint32_t base, uint32_t irq) "id=%d, base 0x%x, irq %u"
trace-events +0 -8
index 1ac1285..8a4f05b 100644
@@ -57,14 +57,6 @@ spice_vmc_register_interface(void *scd) "spice vmc registered interface %p"
 spice_vmc_unregister_interface(void *scd) "spice vmc unregistered interface %p"
 spice_vmc_event(int event) "spice vmc event %d"
 
-# hw/isa/pc87312.c
-pc87312_io_read(uint32_t addr, uint32_t val) "read addr=%x val=%x"
-pc87312_io_write(uint32_t addr, uint32_t val) "write addr=%x val=%x"
-pc87312_info_floppy(uint32_t base) "base 0x%x"
-pc87312_info_ide(uint32_t base) "base 0x%x"
-pc87312_info_parallel(uint32_t base, uint32_t irq) "base 0x%x, irq %u"
-pc87312_info_serial(int n, uint32_t base, uint32_t irq) "id=%d, base 0x%x, irq %u"
-
 # xen-hvm.c
 xen_ram_alloc(unsigned long ram_addr, unsigned long size) "requested: %#lx, size %#lx"
 xen_client_set_memory(uint64_t start_addr, unsigned long size, bool log_dirty) "%#"PRIx64" size %#lx, log_dirty %i"
Signature · 1 line
2.5.5
#29 lore raw

PATCH 24/40 trace: split out trace events for hw/i386/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/i386/ directory to their own file.

---
 Makefile.objs        |  1 +
 hw/i386/trace-events | 37 +++++++++++++++++++++++++++++++++++++
 trace-events         | 11 -----------
 3 files changed, 38 insertions(+), 11 deletions(-)
 create mode 100644 hw/i386/trace-events
Makefile.objs +1 -0
index 764e6fd..e1f5cc6 100644
@@ -141,3 +141,4 @@ trace-events-y += hw/dma/trace-events
 trace-events-y += hw/sparc/trace-events
 trace-events-y += hw/sd/trace-events
 trace-events-y += hw/isa/trace-events
+trace-events-y += hw/i386/trace-events
hw/i386/trace-events new file +37 -0
new file mode 100644
index 0000000..bd8c3a0
@@ -0,0 +1,37 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# hw/i386/xen/xen_platform.c
+xen_platform_log(char *s) "xen platform: %s"
+
+# hw/i386/xen/xen_pvdevice.c
+xen_pv_mmio_read(uint64_t addr) "WARNING: read from Xen PV Device MMIO space (address %"PRIx64")"
+xen_pv_mmio_write(uint64_t addr) "WARNING: write to Xen PV Device MMIO space (address %"PRIx64")"
+
+# hw/i386/pc.c
+mhp_pc_dimm_assigned_slot(int slot) "0x%d"
+mhp_pc_dimm_assigned_address(uint64_t addr) "0x%"PRIx64
trace-events +0 -11
index 8a4f05b..98313b1 100644
@@ -82,9 +82,6 @@ xen_map_cache(uint64_t phys_addr) "want %#"PRIx64
 xen_remap_bucket(uint64_t index) "index %#"PRIx64
 xen_map_cache_return(void* ptr) "%p"
 
-# hw/i386/xen/xen_platform.c
-xen_platform_log(char *s) "xen platform: %s"
-
 # qemu-coroutine.c
 qemu_coroutine_enter(void *from, void *to, void *opaque) "from %p to %p opaque %p"
 qemu_coroutine_yield(void *from, void *to) "from %p to %p"
@@ -332,10 +329,6 @@ memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned si
 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)"
 
-# hw/i386/xen/xen_pvdevice.c
-xen_pv_mmio_read(uint64_t addr) "WARNING: read from Xen PV Device MMIO space (address %"PRIx64")"
-xen_pv_mmio_write(uint64_t addr) "WARNING: write to Xen PV Device MMIO space (address %"PRIx64")"
-
 # hw/pci/pci_host.c
 pci_cfg_read(const char *dev, unsigned devid, unsigned fnid, unsigned offs, unsigned val) "%s %02u:%u @0x%x -> 0x%x"
 pci_cfg_write(const char *dev, unsigned devid, unsigned fnid, unsigned offs, unsigned val) "%s %02u:%u @0x%x <- 0x%x"
@@ -473,10 +466,6 @@ mhp_acpi_clear_remove_evt(uint32_t slot) "slot[0x%"PRIx32"] clear remove event"
 mhp_acpi_pc_dimm_deleted(uint32_t slot) "slot[0x%"PRIx32"] pc-dimm deleted"
 mhp_acpi_pc_dimm_delete_failed(uint32_t slot) "slot[0x%"PRIx32"] pc-dimm delete failed"
 
-# hw/i386/pc.c
-mhp_pc_dimm_assigned_slot(int slot) "0x%d"
-mhp_pc_dimm_assigned_address(uint64_t addr) "0x%"PRIx64
-
 # target-s390x/kvm.c
 kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
 kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
Signature · 1 line
2.5.5
#30 lore raw

PATCH 25/40 trace: split out trace events for hw/9pfs/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/9pfs/ directory to their own file.

---
 Makefile.objs        |  1 +
 hw/9pfs/trace-events | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events         | 46 ---------------------------------
 3 files changed, 73 insertions(+), 46 deletions(-)
 create mode 100644 hw/9pfs/trace-events
Makefile.objs +1 -0
index e1f5cc6..82bef4d 100644
@@ -142,3 +142,4 @@ trace-events-y += hw/sparc/trace-events
 trace-events-y += hw/sd/trace-events
 trace-events-y += hw/isa/trace-events
 trace-events-y += hw/i386/trace-events
+trace-events-y += hw/9pfs/trace-events
hw/9pfs/trace-events new file +72 -0

72 lines not on this page · raw message

trace-events +0 -46

52 lines not on this page · raw message

Signature · 1 line
2.5.5
#31 lore raw

PATCH 26/40 trace: split out trace events for hw/ppc/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/ppc/ directory to their own file.

---
 Makefile.objs       |  1 +
 hw/ppc/trace-events | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events        | 38 -------------------------------
 3 files changed, 65 insertions(+), 38 deletions(-)
 create mode 100644 hw/ppc/trace-events
Makefile.objs +1 -0
index 82bef4d..388e2e9 100644
@@ -143,3 +143,4 @@ trace-events-y += hw/sd/trace-events
 trace-events-y += hw/isa/trace-events
 trace-events-y += hw/i386/trace-events
 trace-events-y += hw/9pfs/trace-events
+trace-events-y += hw/ppc/trace-events
hw/ppc/trace-events new file +64 -0

64 lines not on this page · raw message

trace-events +0 -38
index 7def228..b977763 100644
@@ -184,48 +184,10 @@ qemu_spice_destroy_primary_surface(int qid, uint32_t sid, int async) "%d sid=%u
 qemu_spice_wakeup(uint32_t qid) "%d"
 qemu_spice_create_update(uint32_t left, uint32_t right, uint32_t top, uint32_t bottom) "lr %d -> %d,  tb -> %d -> %d"
 
-# hw/ppc/spapr_pci.c
-spapr_pci_msi(const char *msg, uint32_t ca) "%s (cfg=%x)"
-spapr_pci_msi_setup(const char *name, unsigned vector, uint64_t addr) "dev\"%s\" vector %u, addr=%"PRIx64
-spapr_pci_rtas_ibm_change_msi(unsigned cfg, unsigned func, unsigned req, unsigned first) "cfgaddr %x func %u, requested %u, first irq %u"
-spapr_pci_rtas_ibm_query_interrupt_source_number(unsigned ioa, unsigned intr) "queries for #%u, IRQ%u"
-spapr_pci_msi_write(uint64_t addr, uint64_t data, uint32_t dt_irq) "@%"PRIx64"<=%"PRIx64" IRQ %u"
-spapr_pci_lsi_set(const char *busname, int pin, uint32_t irq) "%s PIN%d IRQ %u"
-spapr_pci_msi_retry(unsigned config_addr, unsigned req_num, unsigned max_irqs) "Guest device at %x asked %u, have only %u"
-
 # hw/pci/pci.c
 pci_update_mappings_del(void *d, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "d=%p %02x:%02x.%x %d,%#"PRIx64"+%#"PRIx64
 pci_update_mappings_add(void *d, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "d=%p %02x:%02x.%x %d,%#"PRIx64"+%#"PRIx64
 
-# hw/ppc/spapr.c
-spapr_cas_failed(unsigned long n) "DT diff buffer is too small: %ld bytes"
-spapr_cas_continue(unsigned long n) "Copy changes to the guest: %ld bytes"
-
-# hw/ppc/spapr_hcall.c
-spapr_cas_pvr_try(uint32_t pvr) "%x"
-spapr_cas_pvr(uint32_t cur_pvr, bool cpu_match, uint32_t new_pvr, uint64_t pcr) "current=%x, cpu_match=%u, new=%x, compat flags=%"PRIx64
-
-# hw/ppc/spapr_iommu.c
-spapr_iommu_put(uint64_t liobn, uint64_t ioba, uint64_t tce, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tce=0x%"PRIx64" ret=%"PRId64
-spapr_iommu_get(uint64_t liobn, uint64_t ioba, uint64_t ret, uint64_t tce) "liobn=%"PRIx64" ioba=0x%"PRIx64" ret=%"PRId64" tce=0x%"PRIx64
-spapr_iommu_indirect(uint64_t liobn, uint64_t ioba, uint64_t tce, uint64_t iobaN, uint64_t tceN, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tcelist=0x%"PRIx64" iobaN=0x%"PRIx64" tceN=0x%"PRIx64" ret=%"PRId64
-spapr_iommu_stuff(uint64_t liobn, uint64_t ioba, uint64_t tce_value, uint64_t npages, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tcevalue=0x%"PRIx64" npages=%"PRId64" ret=%"PRId64
-spapr_iommu_pci_put(uint64_t liobn, uint64_t ioba, uint64_t tce, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tce=0x%"PRIx64" ret=%"PRId64
-spapr_iommu_pci_get(uint64_t liobn, uint64_t ioba, uint64_t ret, uint64_t tce) "liobn=%"PRIx64" ioba=0x%"PRIx64" ret=%"PRId64" tce=0x%"PRIx64
-spapr_iommu_pci_indirect(uint64_t liobn, uint64_t ioba, uint64_t tce, uint64_t iobaN, uint64_t tceN, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tcelist=0x%"PRIx64" iobaN=0x%"PRIx64" tceN=0x%"PRIx64" ret=%"PRId64
-spapr_iommu_pci_stuff(uint64_t liobn, uint64_t ioba, uint64_t tce_value, uint64_t npages, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tcevalue=0x%"PRIx64" npages=%"PRId64" ret=%"PRId64
-spapr_iommu_xlate(uint64_t liobn, uint64_t ioba, uint64_t tce, unsigned perm, unsigned pgsize) "liobn=%"PRIx64" 0x%"PRIx64" -> 0x%"PRIx64" perm=%u mask=%x"
-spapr_iommu_new_table(uint64_t liobn, void *table, int fd) "liobn=%"PRIx64" table=%p fd=%d"
-spapr_iommu_pre_save(uint64_t liobn, uint32_t nb, uint64_t offs, uint32_t ps) "liobn=%"PRIx64" %"PRIx32" bus_offset=%"PRIx64" ps=%"PRIu32
-spapr_iommu_post_load(uint64_t liobn, uint32_t pre_nb, uint32_t post_nb, uint64_t offs, uint32_t ps) "liobn=%"PRIx64" %"PRIx32" => %"PRIx32" bus_offset=%"PRIx64" ps=%"PRIu32
-
-# hw/ppc/ppc.c
-ppc_tb_adjust(uint64_t offs1, uint64_t offs2, int64_t diff, int64_t seconds) "adjusted from 0x%"PRIx64" to 0x%"PRIx64", diff %"PRId64" (%"PRId64"s)"
-
-# hw/ppc/prep.c
-prep_io_800_writeb(uint32_t addr, uint32_t val) "0x%08" PRIx32 " => 0x%02" PRIx32
-prep_io_800_readb(uint32_t addr, uint32_t retval) "0x%08" PRIx32 " <= 0x%02" PRIx32
-
 # target-s390x/mmu_helper.c
 get_skeys_nonzero(int rc) "SKEY: Call to get_skeys unexpectedly returned %d"
 set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d"
Signature · 1 line
2.5.5
#32 lore raw

PATCH 27/40 trace: split out trace events for hw/pci/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/pci/ directory to their own file.

---
 Makefile.objs       |  1 +
 hw/pci/trace-events | 34 ++++++++++++++++++++++++++++++++++
 trace-events        |  8 --------
 3 files changed, 35 insertions(+), 8 deletions(-)
 create mode 100644 hw/pci/trace-events
Makefile.objs +1 -0
index 388e2e9..c046e53 100644
@@ -144,3 +144,4 @@ trace-events-y += hw/isa/trace-events
 trace-events-y += hw/i386/trace-events
 trace-events-y += hw/9pfs/trace-events
 trace-events-y += hw/ppc/trace-events
+trace-events-y += hw/pci/trace-events
hw/pci/trace-events new file +34 -0
new file mode 100644
index 0000000..c0deaa9
@@ -0,0 +1,34 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# hw/pci/pci.c
+pci_update_mappings_del(void *d, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "d=%p %02x:%02x.%x %d,%#"PRIx64"+%#"PRIx64
+pci_update_mappings_add(void *d, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "d=%p %02x:%02x.%x %d,%#"PRIx64"+%#"PRIx64
+
+# hw/pci/pci_host.c
+pci_cfg_read(const char *dev, unsigned devid, unsigned fnid, unsigned offs, unsigned val) "%s %02u:%u @0x%x -> 0x%x"
+pci_cfg_write(const char *dev, unsigned devid, unsigned fnid, unsigned offs, unsigned val) "%s %02u:%u @0x%x <- 0x%x"
trace-events +0 -8
index b977763..8be3678 100644
@@ -184,10 +184,6 @@ qemu_spice_destroy_primary_surface(int qid, uint32_t sid, int async) "%d sid=%u
 qemu_spice_wakeup(uint32_t qid) "%d"
 qemu_spice_create_update(uint32_t left, uint32_t right, uint32_t top, uint32_t bottom) "lr %d -> %d,  tb -> %d -> %d"
 
-# hw/pci/pci.c
-pci_update_mappings_del(void *d, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "d=%p %02x:%02x.%x %d,%#"PRIx64"+%#"PRIx64
-pci_update_mappings_add(void *d, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "d=%p %02x:%02x.%x %d,%#"PRIx64"+%#"PRIx64
-
 # target-s390x/mmu_helper.c
 get_skeys_nonzero(int rc) "SKEY: Call to get_skeys unexpectedly returned %d"
 set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d"
@@ -245,10 +241,6 @@ memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned si
 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)"
 
-# hw/pci/pci_host.c
-pci_cfg_read(const char *dev, unsigned devid, unsigned fnid, unsigned offs, unsigned val) "%s %02u:%u @0x%x -> 0x%x"
-pci_cfg_write(const char *dev, unsigned devid, unsigned fnid, unsigned offs, unsigned val) "%s %02u:%u @0x%x <- 0x%x"
-
 # hw/vfio/pci.c
 vfio_intx_interrupt(const char *name, char line) " (%s) Pin %c"
 vfio_intx_eoi(const char *name) " (%s) EOI"
Signature · 1 line
2.5.5
#33 lore raw

PATCH 28/40 trace: split out trace events for hw/s390x/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/s390x/ directory to their own file.

---
 Makefile.objs         |  1 +
 hw/s390x/trace-events | 39 +++++++++++++++++++++++++++++++++++++++
 trace-events          | 13 -------------
 3 files changed, 40 insertions(+), 13 deletions(-)
 create mode 100644 hw/s390x/trace-events
Makefile.objs +1 -0
index c046e53..551e73e 100644
@@ -145,3 +145,4 @@ trace-events-y += hw/i386/trace-events
 trace-events-y += hw/9pfs/trace-events
 trace-events-y += hw/ppc/trace-events
 trace-events-y += hw/pci/trace-events
+trace-events-y += hw/s390x/trace-events
hw/s390x/trace-events new file +39 -0
new file mode 100644
index 0000000..d3e1018
@@ -0,0 +1,39 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# hw/s390x/css.c
+css_enable_facility(const char *facility) "CSS: enable %s"
+css_crw(uint8_t rsc, uint8_t erc, uint16_t rsid, const char *chained) "CSS: queueing crw: rsc=%x, erc=%x, rsid=%x %s"
+css_chpid_add(uint8_t cssid, uint8_t chpid, uint8_t type) "CSS: add chpid %x.%02x (type %02x)"
+css_new_image(uint8_t cssid, const char *default_cssid) "CSS: add css image %02x %s"
+css_assign_subch(const char *do_assign, uint8_t cssid, uint8_t ssid, uint16_t schid, uint16_t devno) "CSS: %s %x.%x.%04x (devno %04x)"
+css_io_interrupt(int cssid, int ssid, int schid, uint32_t intparm, uint8_t isc, const char *conditional) "CSS: I/O interrupt on sch %x.%x.%04x (intparm %08x, isc %x) %s"
+css_adapter_interrupt(uint8_t isc) "CSS: adapter I/O interrupt (isc %x)"
+
+# hw/s390x/virtio-ccw.c
+virtio_ccw_interpret_ccw(int cssid, int ssid, int schid, int cmd_code) "VIRTIO-CCW: %x.%x.%04x: interpret command %x"
+virtio_ccw_new_device(int cssid, int ssid, int schid, int devno, const char *devno_mode) "VIRTIO-CCW: add subchannel %x.%x.%04x, devno %04x (%s)"
trace-events +0 -13
index 8be3678..472f904 100644
@@ -194,19 +194,6 @@ ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%x.
 ioinst_chp_id(const char *insn, int cssid, int chpid) "IOINST: %s (%x.%02x)"
 ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command %04x, len %04x"
 
-# hw/s390x/css.c
-css_enable_facility(const char *facility) "CSS: enable %s"
-css_crw(uint8_t rsc, uint8_t erc, uint16_t rsid, const char *chained) "CSS: queueing crw: rsc=%x, erc=%x, rsid=%x %s"
-css_chpid_add(uint8_t cssid, uint8_t chpid, uint8_t type) "CSS: add chpid %x.%02x (type %02x)"
-css_new_image(uint8_t cssid, const char *default_cssid) "CSS: add css image %02x %s"
-css_assign_subch(const char *do_assign, uint8_t cssid, uint8_t ssid, uint16_t schid, uint16_t devno) "CSS: %s %x.%x.%04x (devno %04x)"
-css_io_interrupt(int cssid, int ssid, int schid, uint32_t intparm, uint8_t isc, const char *conditional) "CSS: I/O interrupt on sch %x.%x.%04x (intparm %08x, isc %x) %s"
-css_adapter_interrupt(uint8_t isc) "CSS: adapter I/O interrupt (isc %x)"
-
-# hw/s390x/virtio-ccw.c
-virtio_ccw_interpret_ccw(int cssid, int ssid, int schid, int cmd_code) "VIRTIO-CCW: %x.%x.%04x: interpret command %x"
-virtio_ccw_new_device(int cssid, int ssid, int schid, int devno, const char *devno_mode) "VIRTIO-CCW: add subchannel %x.%x.%04x, devno %04x (%s)"
-
 # kvm-all.c
 kvm_ioctl(int type, void *arg) "type 0x%x, arg %p"
 kvm_vm_ioctl(int type, void *arg) "type 0x%x, arg %p"
Signature · 1 line
2.5.5
#34 lore raw

PATCH 29/40 trace: split out trace events for hw/vfio/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/vfio/ directory to their own file.

---
 Makefile.objs        |   1 +
 hw/vfio/trace-events | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++
 trace-events         | 116 ------------------------------------------
 3 files changed, 142 insertions(+), 116 deletions(-)
 create mode 100644 hw/vfio/trace-events
Makefile.objs +1 -0
index 551e73e..f2753bf 100644
@@ -146,3 +146,4 @@ trace-events-y += hw/9pfs/trace-events
 trace-events-y += hw/ppc/trace-events
 trace-events-y += hw/pci/trace-events
 trace-events-y += hw/s390x/trace-events
+trace-events-y += hw/vfio/trace-events
hw/vfio/trace-events new file +141 -0

141 lines not on this page · raw message

trace-events +0 -116

122 lines not on this page · raw message

Signature · 1 line
2.5.5
#35 lore raw

PATCH 30/40 trace: split out trace events for hw/acpi/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/acpi/ directory to their own file.

---
 Makefile.objs        |  1 +
 hw/acpi/trace-events | 43 +++++++++++++++++++++++++++++++++++++++++++
 trace-events         | 17 -----------------
 3 files changed, 44 insertions(+), 17 deletions(-)
 create mode 100644 hw/acpi/trace-events
Makefile.objs +1 -0
index f2753bf..767ffa3 100644
@@ -147,3 +147,4 @@ trace-events-y += hw/ppc/trace-events
 trace-events-y += hw/pci/trace-events
 trace-events-y += hw/s390x/trace-events
 trace-events-y += hw/vfio/trace-events
+trace-events-y += hw/acpi/trace-events
hw/acpi/trace-events new file +43 -0

43 lines not on this page · raw message

trace-events +0 -17
index 72a8fdf..c0446eb 100644
@@ -228,23 +228,6 @@ memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned si
 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)"
 
-#hw/acpi/memory_hotplug.c
-mhp_acpi_invalid_slot_selected(uint32_t slot) "0x%"PRIx32
-mhp_acpi_ejecting_invalid_slot(uint32_t slot) "0x%"PRIx32
-mhp_acpi_read_addr_lo(uint32_t slot, uint32_t addr) "slot[0x%"PRIx32"] addr lo: 0x%"PRIx32
-mhp_acpi_read_addr_hi(uint32_t slot, uint32_t addr) "slot[0x%"PRIx32"] addr hi: 0x%"PRIx32
-mhp_acpi_read_size_lo(uint32_t slot, uint32_t size) "slot[0x%"PRIx32"] size lo: 0x%"PRIx32
-mhp_acpi_read_size_hi(uint32_t slot, uint32_t size) "slot[0x%"PRIx32"] size hi: 0x%"PRIx32
-mhp_acpi_read_pxm(uint32_t slot, uint32_t pxm) "slot[0x%"PRIx32"] proximity: 0x%"PRIx32
-mhp_acpi_read_flags(uint32_t slot, uint32_t flags) "slot[0x%"PRIx32"] flags: 0x%"PRIx32
-mhp_acpi_write_slot(uint32_t slot) "set active slot: 0x%"PRIx32
-mhp_acpi_write_ost_ev(uint32_t slot, uint32_t ev) "slot[0x%"PRIx32"] OST EVENT: 0x%"PRIx32
-mhp_acpi_write_ost_status(uint32_t slot, uint32_t st) "slot[0x%"PRIx32"] OST STATUS: 0x%"PRIx32
-mhp_acpi_clear_insert_evt(uint32_t slot) "slot[0x%"PRIx32"] clear insert event"
-mhp_acpi_clear_remove_evt(uint32_t slot) "slot[0x%"PRIx32"] clear remove event"
-mhp_acpi_pc_dimm_deleted(uint32_t slot) "slot[0x%"PRIx32"] pc-dimm deleted"
-mhp_acpi_pc_dimm_delete_failed(uint32_t slot) "slot[0x%"PRIx32"] pc-dimm delete failed"
-
 # target-s390x/kvm.c
 kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
 kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
Signature · 1 line
2.5.5
#36 lore raw

PATCH 31/40 trace: split out trace events for hw/arm/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/arm/ directory to their own file.

---
 Makefile.objs       |  1 +
 hw/arm/trace-events | 29 +++++++++++++++++++++++++++++
 trace-events        |  3 ---
 3 files changed, 30 insertions(+), 3 deletions(-)
 create mode 100644 hw/arm/trace-events
Makefile.objs +1 -0
index 767ffa3..cc0e1cc 100644
@@ -148,3 +148,4 @@ trace-events-y += hw/pci/trace-events
 trace-events-y += hw/s390x/trace-events
 trace-events-y += hw/vfio/trace-events
 trace-events-y += hw/acpi/trace-events
+trace-events-y += hw/arm/trace-events
hw/arm/trace-events new file +29 -0
new file mode 100644
index 0000000..4759f77
@@ -0,0 +1,29 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# hw/arm/virt-acpi-build.c
+virt_acpi_setup(void) "No fw cfg or ACPI disabled. Bailing out."
trace-events +0 -3
index c0446eb..04ad211 100644
@@ -239,9 +239,6 @@ cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
 cpu_halt(int cpu_index) "halting cpu %d"
 cpu_unhalt(int cpu_index) "unhalting cpu %d"
 
-# hw/arm/virt-acpi-build.c
-virt_acpi_setup(void) "No fw cfg or ACPI disabled. Bailing out."
-
 # hw/alpha/pci.c
 alpha_pci_iack_write(void) ""
 
Signature · 1 line
2.5.5
#37 lore raw

PATCH 32/40 trace: split out trace events for hw/alpha/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the hw/alpha/ directory to their own file.

---
 Makefile.objs         |  1 +
 hw/alpha/trace-events | 29 +++++++++++++++++++++++++++++
 trace-events          |  3 ---
 3 files changed, 30 insertions(+), 3 deletions(-)
 create mode 100644 hw/alpha/trace-events
Makefile.objs +1 -0
index cc0e1cc..c5e03bc 100644
@@ -149,3 +149,4 @@ trace-events-y += hw/s390x/trace-events
 trace-events-y += hw/vfio/trace-events
 trace-events-y += hw/acpi/trace-events
 trace-events-y += hw/arm/trace-events
+trace-events-y += hw/alpha/trace-events
hw/alpha/trace-events new file +29 -0
new file mode 100644
index 0000000..39faf7c
@@ -0,0 +1,29 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# hw/alpha/pci.c
+alpha_pci_iack_write(void) ""
trace-events +0 -3
index 04ad211..dbb80bb 100644
@@ -239,9 +239,6 @@ cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
 cpu_halt(int cpu_index) "halting cpu %d"
 cpu_unhalt(int cpu_index) "unhalting cpu %d"
 
-# hw/alpha/pci.c
-alpha_pci_iack_write(void) ""
-
 # audio/alsaaudio.c
 alsa_revents(int revents) "revents = %d"
 alsa_pollout(int i, int fd) "i = %d fd = %d"
Signature · 1 line
2.5.5
#38 lore raw

PATCH 33/40 trace: split out trace events for ui/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the ui/ directory to their own file.

---
 Makefile.objs   |  1 +
 trace-events    | 47 -------------------------------------
 ui/trace-events | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 74 insertions(+), 47 deletions(-)
 create mode 100644 ui/trace-events
Makefile.objs +1 -0
index c5e03bc..32b5265 100644
@@ -150,3 +150,4 @@ trace-events-y += hw/vfio/trace-events
 trace-events-y += hw/acpi/trace-events
 trace-events-y += hw/arm/trace-events
 trace-events-y += hw/alpha/trace-events
+trace-events-y += ui/trace-events
trace-events +0 -47

53 lines not on this page · raw message

ui/trace-events new file +73 -0

73 lines not on this page · raw message

Signature · 1 line
2.5.5
#39 lore raw

PATCH 34/40 trace: split out trace events for audio/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the audio/ directory to their own file.

---
 Makefile.objs      |  1 +
 audio/trace-events | 42 ++++++++++++++++++++++++++++++++++++++++++
 trace-events       | 16 ----------------
 3 files changed, 43 insertions(+), 16 deletions(-)
 create mode 100644 audio/trace-events
Makefile.objs +1 -0
index 32b5265..562acfa 100644
@@ -151,3 +151,4 @@ trace-events-y += hw/acpi/trace-events
 trace-events-y += hw/arm/trace-events
 trace-events-y += hw/alpha/trace-events
 trace-events-y += ui/trace-events
+trace-events-y += audio/trace-events
audio/trace-events new file +42 -0

42 lines not on this page · raw message

trace-events +0 -16
index 9e0c103..3386c16 100644
@@ -192,22 +192,6 @@ cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
 cpu_halt(int cpu_index) "halting cpu %d"
 cpu_unhalt(int cpu_index) "unhalting cpu %d"
 
-# audio/alsaaudio.c
-alsa_revents(int revents) "revents = %d"
-alsa_pollout(int i, int fd) "i = %d fd = %d"
-alsa_set_handler(int events, int index, int fd, int err) "events=%#x index=%d fd=%d err=%d"
-alsa_wrote_zero(int len) "Failed to write %d frames (wrote zero)"
-alsa_read_zero(long len) "Failed to read %ld frames (read zero)"
-alsa_xrun_out(void) "Recovering from playback xrun"
-alsa_xrun_in(void) "Recovering from capture xrun"
-alsa_resume_out(void) "Resuming suspended output stream"
-alsa_resume_in(void) "Resuming suspended input stream"
-alsa_no_frames(int state) "No frames available and ALSA state is %d"
-
-# audio/ossaudio.c
-oss_version(int version) "OSS version = %#x"
-oss_invalid_available_size(int size, int bufsize) "Invalid available size, size=%d bufsize=%d"
-
 # net/vhost-user.c
 vhost_user_event(const char *chr, int event) "chr: %s got event: %d"
 
Signature · 1 line
2.5.5
#40 lore raw

PATCH 35/40 trace: split out trace events for net/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the net/ directory to their own file.

---
 Makefile.objs    |  1 +
 net/trace-events | 29 +++++++++++++++++++++++++++++
 trace-events     |  3 ---
 3 files changed, 30 insertions(+), 3 deletions(-)
 create mode 100644 net/trace-events
Makefile.objs +1 -0
index 562acfa..22f45b9 100644
@@ -152,3 +152,4 @@ trace-events-y += hw/arm/trace-events
 trace-events-y += hw/alpha/trace-events
 trace-events-y += ui/trace-events
 trace-events-y += audio/trace-events
+trace-events-y += net/trace-events
net/trace-events new file +29 -0
new file mode 100644
index 0000000..66bdbf3
@@ -0,0 +1,29 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# net/vhost-user.c
+vhost_user_event(const char *chr, int event) "chr: %s got event: %d"
trace-events +0 -3
index 3386c16..e5bc1c9 100644
@@ -192,9 +192,6 @@ cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
 cpu_halt(int cpu_index) "halting cpu %d"
 cpu_unhalt(int cpu_index) "unhalting cpu %d"
 
-# net/vhost-user.c
-vhost_user_event(const char *chr, int event) "chr: %s got event: %d"
-
 # linux-user/signal.c
 user_setup_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
 user_setup_rt_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
Signature · 1 line
2.5.5
#41 lore raw

PATCH 36/40 trace: split out trace events for target-sparc/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the target-sparc/ directory to their own file.

---
 Makefile.objs             |  1 +
 target-sparc/trace-events | 53 +++++++++++++++++++++++++++++++++++++++++++++++
 trace-events              | 27 ------------------------
 3 files changed, 54 insertions(+), 27 deletions(-)
 create mode 100644 target-sparc/trace-events
Makefile.objs +1 -0
index 22f45b9..16c84c2 100644
@@ -153,3 +153,4 @@ trace-events-y += hw/alpha/trace-events
 trace-events-y += ui/trace-events
 trace-events-y += audio/trace-events
 trace-events-y += net/trace-events
+trace-events-y += target-sparc/trace-events
target-sparc/trace-events new file +53 -0

53 lines not on this page · raw message

trace-events +0 -27
index e5bc1c9..2a8f1ec 100644
@@ -103,33 +103,6 @@ monitor_protocol_event_emit(uint32_t event, void *data) "event=%d data=%p"
 monitor_protocol_event_queue(uint32_t event, void *qdict, uint64_t rate) "event=%d data=%p rate=%" PRId64
 monitor_protocol_event_throttle(uint32_t event, uint64_t rate) "event=%d rate=%" PRId64
 
-# target-sparc/mmu_helper.c
-mmu_helper_dfault(uint64_t address, uint64_t context, int mmu_idx, uint32_t tl) "DFAULT at %"PRIx64" context %"PRIx64" mmu_idx=%d tl=%d"
-mmu_helper_dprot(uint64_t address, uint64_t context, int mmu_idx, uint32_t tl) "DPROT at %"PRIx64" context %"PRIx64" mmu_idx=%d tl=%d"
-mmu_helper_dmiss(uint64_t address, uint64_t context) "DMISS at %"PRIx64" context %"PRIx64
-mmu_helper_tfault(uint64_t address, uint64_t context) "TFAULT at %"PRIx64" context %"PRIx64
-mmu_helper_tmiss(uint64_t address, uint64_t context) "TMISS at %"PRIx64" context %"PRIx64
-mmu_helper_get_phys_addr_code(uint32_t tl, int mmu_idx, uint64_t prim_context, uint64_t sec_context, uint64_t address) "tl=%d mmu_idx=%d primary context=%"PRIx64" secondary context=%"PRIx64" address=%"PRIx64
-mmu_helper_get_phys_addr_data(uint32_t tl, int mmu_idx, uint64_t prim_context, uint64_t sec_context, uint64_t address) "tl=%d mmu_idx=%d primary context=%"PRIx64" secondary context=%"PRIx64" address=%"PRIx64
-mmu_helper_mmu_fault(uint64_t address, uint64_t paddr, int mmu_idx, uint32_t tl, uint64_t prim_context, uint64_t sec_context) "Translate at %"PRIx64" -> %"PRIx64", mmu_idx=%d tl=%d primary context=%"PRIx64" secondary context=%"PRIx64
-
-# target-sparc/int64_helper.c
-int_helper_set_softint(uint32_t softint) "new %08x"
-int_helper_clear_softint(uint32_t softint) "new %08x"
-int_helper_write_softint(uint32_t softint) "new %08x"
-
-# target-sparc/int32_helper.c
-int_helper_icache_freeze(void) "Instruction cache: freeze"
-int_helper_dcache_freeze(void) "Data cache: freeze"
-
-# target-sparc/win_helper.c
-win_helper_gregset_error(uint32_t pstate) "ERROR in get_gregset: active pstate bits=%x"
-win_helper_switch_pstate(uint32_t pstate_regs, uint32_t new_pstate_regs) "change_pstate: switching regs old=%x new=%x"
-win_helper_no_switch_pstate(uint32_t new_pstate_regs) "change_pstate: regs new=%x (unchanged)"
-win_helper_wrpil(uint32_t psrpil, uint32_t new_pil) "old=%x new=%x"
-win_helper_done(uint32_t tl) "tl=%d"
-win_helper_retry(uint32_t tl) "tl=%d"
-
 # dma-helpers.c
 dma_blk_io(void *dbs, void *bs, int64_t offset, bool to_dev) "dbs=%p bs=%p offset=%" PRId64 " to_dev=%d"
 dma_aio_cancel(void *dbs) "dbs=%p"
Signature · 1 line
2.5.5
#42 lore raw

PATCH 37/40 trace: split out trace events for target-s390x/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the target-s390x/ directory to their own file.

---
 Makefile.objs             |  1 +
 target-s390x/trace-events | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 trace-events              | 21 ---------------------
 3 files changed, 47 insertions(+), 21 deletions(-)
 create mode 100644 target-s390x/trace-events
Makefile.objs +1 -0
index 16c84c2..f1e8646 100644
@@ -154,3 +154,4 @@ trace-events-y += ui/trace-events
 trace-events-y += audio/trace-events
 trace-events-y += net/trace-events
 trace-events-y += target-sparc/trace-events
+trace-events-y += target-s390x/trace-events
target-s390x/trace-events new file +46 -0

46 lines not on this page · raw message

trace-events +0 -21
index 2a8f1ec..63233e3 100644
@@ -110,16 +110,6 @@ dma_complete(void *dbs, int ret, void *cb) "dbs=%p ret=%d cb=%p"
 dma_blk_cb(void *dbs, int ret) "dbs=%p ret=%d"
 dma_map_wait(void *dbs) "dbs=%p"
 
-# target-s390x/mmu_helper.c
-get_skeys_nonzero(int rc) "SKEY: Call to get_skeys unexpectedly returned %d"
-set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d"
-
-# target-s390x/ioinst.c
-ioinst(const char *insn) "IOINST: %s"
-ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%x.%x.%04x)"
-ioinst_chp_id(const char *insn, int cssid, int chpid) "IOINST: %s (%x.%02x)"
-ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command %04x, len %04x"
-
 # kvm-all.c
 kvm_ioctl(int type, void *arg) "type 0x%x, arg %p"
 kvm_vm_ioctl(int type, void *arg) "type 0x%x, arg %p"
@@ -154,17 +144,6 @@ memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned si
 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)"
 
-# target-s390x/kvm.c
-kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
-kvm_clear_cmma(int rc) "CMMA: clearing with result code %d"
-kvm_failed_cpu_state_set(int cpu_index, uint8_t state, const char *msg) "Warning: Unable to set cpu %d state %" PRIu8 " to KVM: %s"
-kvm_sigp_finished(uint8_t order, int cpu_index, int dst_index, int cc) "SIGP: Finished order %u on cpu %d -> cpu %d with cc=%d"
-
-# target-s390x/cpu.c
-cpu_set_state(int cpu_index, uint8_t state) "setting cpu %d state to %" PRIu8
-cpu_halt(int cpu_index) "halting cpu %d"
-cpu_unhalt(int cpu_index) "unhalting cpu %d"
-
 # linux-user/signal.c
 user_setup_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
 user_setup_rt_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
Signature · 1 line
2.5.5
#43 lore raw

PATCH 38/40 trace: split out trace events for target-ppc/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the target-ppc/ directory to their own file.

---
 Makefile.objs           |  1 +
 target-ppc/trace-events | 30 ++++++++++++++++++++++++++++++
 trace-events            |  4 ----
 3 files changed, 31 insertions(+), 4 deletions(-)
 create mode 100644 target-ppc/trace-events
Makefile.objs +1 -0
index f1e8646..ad7419b 100644
@@ -155,3 +155,4 @@ trace-events-y += audio/trace-events
 trace-events-y += net/trace-events
 trace-events-y += target-sparc/trace-events
 trace-events-y += target-s390x/trace-events
+trace-events-y += target-ppc/trace-events
target-ppc/trace-events new file +30 -0
new file mode 100644
index 0000000..8f61687
@@ -0,0 +1,30 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# target-ppc/kvm.c
+kvm_failed_spr_set(int str, const char *msg) "Warning: Unable to set SPR %d to KVM: %s"
+kvm_failed_spr_get(int str, const char *msg) "Warning: Unable to retrieve SPR %d from KVM: %s"
trace-events +0 -4
index 63233e3..343e65a 100644
@@ -119,10 +119,6 @@ kvm_device_ioctl(int fd, int type, void *arg) "dev fd %d, type 0x%x, arg %p"
 kvm_failed_reg_get(uint64_t id, const char *msg) "Warning: Unable to retrieve ONEREG %" PRIu64 " from KVM: %s"
 kvm_failed_reg_set(uint64_t id, const char *msg) "Warning: Unable to set ONEREG %" PRIu64 " to KVM: %s"
 
-# target-ppc/kvm.c
-kvm_failed_spr_set(int str, const char *msg) "Warning: Unable to set SPR %d to KVM: %s"
-kvm_failed_spr_get(int str, const char *msg) "Warning: Unable to retrieve SPR %d from KVM: %s"
-
 # TCG related tracing (mostly disabled by default)
 # cpu-exec.c
 disable exec_tb(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR
Signature · 1 line
2.5.5
#44 lore raw

PATCH 39/40 trace: split out trace events for qom/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the qom/ directory to their own file.

---
 Makefile.objs    |  1 +
 qom/trace-events | 30 ++++++++++++++++++++++++++++++
 trace-events     |  4 ----
 3 files changed, 31 insertions(+), 4 deletions(-)
 create mode 100644 qom/trace-events
Makefile.objs +1 -0
index ad7419b..9f2c260 100644
@@ -156,3 +156,4 @@ trace-events-y += net/trace-events
 trace-events-y += target-sparc/trace-events
 trace-events-y += target-s390x/trace-events
 trace-events-y += target-ppc/trace-events
+trace-events-y += qom/trace-events
qom/trace-events new file +30 -0
new file mode 100644
index 0000000..d62ef9c
@@ -0,0 +1,30 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# 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)"
trace-events +0 -4
index 343e65a..be4f217 100644
@@ -136,10 +136,6 @@ memory_region_subpage_write(int cpu_index, void *mr, uint64_t offset, uint64_t v
 memory_region_tb_read(int cpu_index, uint64_t addr, uint64_t value, unsigned size) "cpu %d addr %#"PRIx64" value %#"PRIx64" size %u"
 memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned size) "cpu %d addr %#"PRIx64" value %#"PRIx64" size %u"
 
-# 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)"
-
 # linux-user/signal.c
 user_setup_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
 user_setup_rt_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
Signature · 1 line
2.5.5
#45 lore raw

PATCH 40/40 trace: split out trace events for linux-user/ directory

In reply to Daniel P. Berrange

Move all trace-events for files in the linux-user/ directory to their own file.

---
 Makefile.objs           |  1 +
 linux-user/trace-events | 37 +++++++++++++++++++++++++++++++++++++
 trace-events            | 11 -----------
 3 files changed, 38 insertions(+), 11 deletions(-)
 create mode 100644 linux-user/trace-events
Makefile.objs +1 -0
index 9f2c260..7f1f0a3 100644
@@ -157,3 +157,4 @@ trace-events-y += target-sparc/trace-events
 trace-events-y += target-s390x/trace-events
 trace-events-y += target-ppc/trace-events
 trace-events-y += qom/trace-events
+trace-events-y += linux-user/trace-events
linux-user/trace-events new file +37 -0
new file mode 100644
index 0000000..5a7032d
@@ -0,0 +1,37 @@
+# Trace events for debugging and performance instrumentation
+#
+# This file is processed by the tracetool script during the build.
+#
+# To add a new trace event:
+#
+# 1. Choose a name for the trace event.  Declare its arguments and format
+#    string.
+#
+# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
+#    trace_multiwrite_cb().  The source file must #include "trace.h".
+#
+# Format of a trace event:
+#
+# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
+#
+# Example: g_malloc(size_t size) "size %zu"
+#
+# The "disable" keyword will build without the trace event.
+#
+# The <name> must be a valid as a C function name.
+#
+# Types should be standard C types.  Use void * for pointers because the trace
+# system may not have the necessary headers included.
+#
+# The <format-string> should be a sprintf()-compatible format string.
+
+# linux-user/signal.c
+user_setup_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
+user_setup_rt_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
+user_do_rt_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
+user_do_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
+user_force_sig(void *env, int target_sig, int host_sig) "env=%p signal %d (host %d)"
+user_handle_signal(void *env, int target_sig) "env=%p signal %d"
+user_host_signal(void *env, int host_sig, int target_sig) "env=%p signal %d (target %d("
+user_queue_signal(void *env, int target_sig) "env=%p signal %d"
+user_s390x_restore_sigregs(void *env, uint64_t sc_psw_addr, uint64_t env_psw_addr) "env=%p frame psw.addr %"PRIx64 " current psw.addr %"PRIx64
trace-events +0 -11
index be4f217..8df1827 100644
@@ -135,14 +135,3 @@ memory_region_subpage_read(int cpu_index, void *mr, uint64_t offset, uint64_t va
 memory_region_subpage_write(int cpu_index, void *mr, uint64_t offset, uint64_t value, unsigned size) "cpu %d mr %p offset %#"PRIx64" value %#"PRIx64" size %u"
 memory_region_tb_read(int cpu_index, uint64_t addr, uint64_t value, unsigned size) "cpu %d addr %#"PRIx64" value %#"PRIx64" size %u"
 memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned size) "cpu %d addr %#"PRIx64" value %#"PRIx64" size %u"
-
-# linux-user/signal.c
-user_setup_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
-user_setup_rt_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
-user_do_rt_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
-user_do_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64
-user_force_sig(void *env, int target_sig, int host_sig) "env=%p signal %d (host %d)"
-user_handle_signal(void *env, int target_sig) "env=%p signal %d"
-user_host_signal(void *env, int host_sig, int target_sig) "env=%p signal %d (target %d("
-user_queue_signal(void *env, int target_sig) "env=%p signal %d"
-user_s390x_restore_sigregs(void *env, uint64_t sc_psw_addr, uint64_t env_psw_addr) "env=%p frame psw.addr %"PRIx64 " current psw.addr %"PRIx64
Signature · 1 line
2.5.5
#46 lore raw
In reply to Daniel P. Berrange
Quoted 2 lines · Daniel P Berrange

To quote Peter today:
pm215: "trace-events: causing merge conflicts since 2010"

[...]

Silly note. You can skip the documentation header on all trace-events file and just reference a single global one (is /trace-events gonna survive for some events?). Otherwise it's very likely the headers will get out of sync.

Cheers,
Lluis

#47 lore raw
In reply to Daniel P. Berrange
Quoted 19 lines · Daniel P. Berrange

To quote Peter today:

pm215: "trace-events: causing merge conflicts since 2010"

There's really no good reason why we should continue to suffer from this. Even if the trace tool generator can't yet generate multiple independant output files, we can still trivially have multiple independant input files.

This series splits up trace-events so that there is one trace-events file per sub-directory that has tracing events defined. This means that the trace-events files now get assoociated with the subsystem maintainers if you run get_maintainer.pl on a patch. It also means that responsibility for resolving conflicts is now delegated to subsystem maintainers, and overall such conflicts should be much rarer.

Quoted 4 lines

Finally, we will likely need this kind of split work done when we do finally get the ability to generate multiple output files, so it is a worthwhile thing to change now regardless.

This looks useful, thanks.

Please update docs/tracing.txt and qemu-options.hx with s/trace-events/trace-events-all/.