Skip to contentSkip to conversation

Move some trace events to the correct files

PATCH Applied Daniel P. Berrange 4 participants 9 messages Sep 14, 2016 – Sep 19, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Move some trace events to the correct files

When I split up the monolithic trace-events file, a few events ended up in incorrect files, partly due to incorrect file name annotations against the events, partly due to my mistakes.

These patches were previously posted as part of my giant series, but since they're trivial I figure they can be usefully queued for merge while the rest of the giant series is debated

https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg01714.html

Daniel P. Berrange (4):
trace: move util/buffer.c trace points into correct file
trace: move util/qemu-coroutine*.c trace points into correct file
trace: move hw/mem/pc-dimm.c trace points into correct file
trace: move hw/virtio/virtio-balloon.c trace points into correct file

 Makefile.objs          |  1 +
 hw/i386/trace-events   |  4 ----
 hw/mem/trace-events    |  5 +++++
 hw/virtio/trace-events |  5 +++++
 io/trace-events        |  6 ------
 trace-events           | 17 -----------------
 util/trace-events      | 19 +++++++++++++++++++
 7 files changed, 30 insertions(+), 27 deletions(-)
 create mode 100644 hw/mem/trace-events
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/4 trace: move util/buffer.c trace points into correct file

The trace points for util/buffer.c were mistakenly put in the io/trace-events file, instead of util/trace-events in

commit 892bd32ea38bbe9709ff0b6db3053bdf06eec9fb
Author: Daniel P. Berrange <[email protected]>
Date: Thu Jun 16 09:39:50 2016 +0100

trace: split out trace events for io/ directory

Move all trace-events for files in the io/ directory to

---
 io/trace-events   | 6 ------
 util/trace-events | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)
io/trace-events +0 -6
index d064665..e31b596 100644
@@ -1,11 +1,5 @@
 # See docs/tracing.txt for syntax documentation.
 
-# io/buffer.c
-buffer_resize(const char *buf, size_t olen, size_t len) "%s: old %zd, new %zd"
-buffer_move_empty(const char *buf, size_t len, const char *from) "%s: %zd bytes from %s"
-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"
-
 # io/task.c
 qio_task_new(void *task, void *source, void *func, void *opaque) "Task new task=%p source=%p func=%p opaque=%p"
 qio_task_complete(void *task) "Task complete task=%p"
util/trace-events +6 -0
index 747e6ba..9114654 100644
@@ -1,5 +1,11 @@
 # See docs/tracing.txt for syntax documentation.
 
+# util/buffer.c
+buffer_resize(const char *buf, size_t olen, size_t len) "%s: old %zd, new %zd"
+buffer_move_empty(const char *buf, size_t len, const char *from) "%s: %zd bytes from %s"
+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/oslib-win32.c
 # util/oslib-posix.c
 qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/4 trace: move util/qemu-coroutine*.c trace points into correct file

In reply to Daniel P. Berrange

The trace points for util/qemu-coroutine*.c were mistakenly left in the top level trace-events file, instead of util/trace-events in

commit 492bb2dd651e780c0723580880acbedb5661e5ad
Author: Daniel P. Berrange <[email protected]>
Date: Thu Jun 16 09:39:48 2016 +0100

trace: split out trace events for util/ directory

---
 trace-events      | 13 -------------
 util/trace-events | 13 +++++++++++++
 2 files changed, 13 insertions(+), 13 deletions(-)
trace-events +0 -13
index 616cc52..eac5251 100644
@@ -83,19 +83,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"
 
-# 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"
-qemu_coroutine_terminate(void *co) "self %p"
-
-# qemu-coroutine-lock.c
-qemu_co_queue_run_restart(void *co) "co %p"
-qemu_co_queue_next(void *nxt) "next %p"
-qemu_co_mutex_lock_entry(void *mutex, void *self) "mutex %p self %p"
-qemu_co_mutex_lock_return(void *mutex, void *self) "mutex %p self %p"
-qemu_co_mutex_unlock_entry(void *mutex, void *self) "mutex %p self %p"
-qemu_co_mutex_unlock_return(void *mutex, void *self) "mutex %p self %p"
-
 # monitor.c
 handle_qmp_command(void *mon, const char *cmd_name) "mon %p cmd_name \"%s\""
 monitor_protocol_emitter(void *mon) "mon %p"
util/trace-events +13 -0
index 9114654..ed06aee 100644
@@ -6,6 +6,19 @@ 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/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"
+qemu_coroutine_terminate(void *co) "self %p"
+
+# util/qemu-coroutine-lock.c
+qemu_co_queue_run_restart(void *co) "co %p"
+qemu_co_queue_next(void *nxt) "next %p"
+qemu_co_mutex_lock_entry(void *mutex, void *self) "mutex %p self %p"
+qemu_co_mutex_lock_return(void *mutex, void *self) "mutex %p self %p"
+qemu_co_mutex_unlock_entry(void *mutex, void *self) "mutex %p self %p"
+qemu_co_mutex_unlock_return(void *mutex, void *self) "mutex %p self %p"
+
 # util/oslib-win32.c
 # util/oslib-posix.c
 qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/4 trace: move hw/mem/pc-dimm.c trace points into correct file

In reply to Daniel P. Berrange

The trace points for hw/mem/pc-dimm.c were mistakenly put in the hw/i386/trace-events file, instead of hw/mem/trace-events in

commit 5eb76e480b42206d3640c1aab8a376ba350f70bb
Author: Daniel P. Berrange <[email protected]>
Date: Thu Jun 16 09:40:10 2016 +0100

trace: split out trace events for hw/i386/ directory

---
 Makefile.objs        | 1 +
 hw/i386/trace-events | 4 ----
 hw/mem/trace-events  | 5 +++++
 3 files changed, 6 insertions(+), 4 deletions(-)
 create mode 100644 hw/mem/trace-events
Makefile.objs +1 -0
index 6d5ddcf..b371ebb 100644
@@ -141,6 +141,7 @@ 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/mem/trace-events
 trace-events-y += hw/i386/trace-events
 trace-events-y += hw/9pfs/trace-events
 trace-events-y += hw/ppc/trace-events
hw/i386/trace-events +0 -4
index 7735e46..4a4a141 100644
@@ -7,9 +7,5 @@ xen_platform_log(char *s) "xen platform: %s"
 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
-
 # hw/i386/x86-iommu.c
 x86_iommu_iec_notify(bool global, uint32_t index, uint32_t mask) "Notify IEC invalidation: global=%d index=%" PRIu32 " mask=%" PRIu32
hw/mem/trace-events new file +5 -0
new file mode 100644
index 0000000..3a49215
@@ -0,0 +1,5 @@
+# See docs/trace-events.txt for syntax documentation.
+
+# hw/mem/pc-dimm.c
+mhp_pc_dimm_assigned_slot(int slot) "0x%d"
+mhp_pc_dimm_assigned_address(uint64_t addr) "0x%"PRIx64
Signature · 1 line
2.7.4
#4 lore raw

PATCH 4/4 trace: move hw/virtio/virtio-balloon.c trace points into correct file

In reply to Daniel P. Berrange

The trace points for hw/virtio/virtio-balloon.c were mistakenly put in the top level trace-events file, instead of util/trace-events in

commit 270ab88f7c1112389a02cee0e3e03b20fcc7547e
Author: Daniel P. Berrange <[email protected]>
Date: Thu Jun 16 09:39:57 2016 +0100

trace: split out trace events for hw/virtio/ directory

---
 hw/virtio/trace-events | 5 +++++
 trace-events           | 4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)
hw/virtio/trace-events +5 -0
index 55184d3..8756cef 100644
@@ -14,3 +14,8 @@ 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"
 
+# hw/virtio/virtio-balloon.c
+virtio_balloon_handle_output(const char *name, uint64_t gpa) "section name: %s gpa: %"PRIx64
+virtio_balloon_get_config(uint32_t num_pages, uint32_t actual) "num_pages: %d actual: %d"
+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"
trace-events +0 -4
index eac5251..069c7a4 100644
@@ -37,10 +37,6 @@ cpu_out(unsigned int addr, char size, unsigned int val) "addr %#x(%c) value %u"
 # balloon.c
 # Since requests are raised via monitor, not many tracepoints are needed.
 balloon_event(void *opaque, unsigned long addr) "opaque %p addr %lu"
-virtio_balloon_handle_output(const char *name, uint64_t gpa) "section name: %s gpa: %"PRIx64
-virtio_balloon_get_config(uint32_t num_pages, uint32_t actual) "num_pages: %d actual: %d"
-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"
 
 # vl.c
 vm_state_notify(int running, int reason) "running %d reason %d"
Signature · 1 line
2.7.4
Reviewed-by on the v1 series
#5 lore raw
In reply to Daniel P. Berrange
Quoted 10 lines · Daniel P. Berrange

When I split up the monolithic trace-events file, a few events ended up in incorrect files, partly due to incorrect file name annotations against the events, partly due to my mistakes.

These patches were previously posted as part of my giant series, but since they're trivial I figure they can be usefully queued for merge while the rest of the giant series is debated

Quoted 7 lines

https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg01714.html

Daniel P. Berrange (4):
trace: move util/buffer.c trace points into correct file
trace: move util/qemu-coroutine*.c trace points into correct file
trace: move hw/mem/pc-dimm.c trace points into correct file
trace: move hw/virtio/virtio-balloon.c trace points into correct file

Quoted 11 lines
 Makefile.objs          |  1 +
 hw/i386/trace-events   |  4 ----
 hw/mem/trace-events    |  5 +++++
 hw/virtio/trace-events |  5 +++++
 io/trace-events        |  6 ------
 trace-events           | 17 -----------------
 util/trace-events      | 19 +++++++++++++++++++
 7 files changed, 30 insertions(+), 27 deletions(-)
 create mode 100644 hw/mem/trace-events
Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#6 lore raw
In reply to Daniel P. Berrange
Quoted 18 lines · Daniel P. Berrange

When I split up the monolithic trace-events file, a few events ended up in incorrect files, partly due to incorrect file name annotations against the events, partly due to my mistakes.

These patches were previously posted as part of my giant series, but since they're trivial I figure they can be usefully queued for merge while the rest of the giant series is debated

https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg01714.html

Daniel P. Berrange (4):
trace: move util/buffer.c trace points into correct file
trace: move util/qemu-coroutine*.c trace points into correct file
trace: move hw/mem/pc-dimm.c trace points into correct file
trace: move hw/virtio/virtio-balloon.c trace points into correct file

Quoted 14 lines
 Makefile.objs          |  1 +
 hw/i386/trace-events   |  4 ----
 hw/mem/trace-events    |  5 +++++
 hw/virtio/trace-events |  5 +++++
 io/trace-events        |  6 ------
 trace-events           | 17 -----------------
 util/trace-events      | 19 +++++++++++++++++++
 7 files changed, 30 insertions(+), 27 deletions(-)
 create mode 100644 hw/mem/trace-events
Signature · 1 line
2.7.4

Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Stefan

#7 lore raw
In reply to Daniel P. Berrange
Quoted 4 lines · Daniel P. Berrange

When I split up the monolithic trace-events file, a few events ended up in incorrect files, partly due to incorrect file name annotations against the events, partly due to my mistakes.

Are you aware of scripts/cleanup-trace-events.pl?

[...]

#8 lore raw
Quoted 8 lines · Markus Armbruster
Quoted 4 lines · Daniel P. Berrange

When I split up the monolithic trace-events file, a few events ended up in incorrect files, partly due to incorrect file name annotations against the events, partly due to my mistakes.

Are you aware of scripts/cleanup-trace-events.pl?

No, I've not seen it before now.

Regards,
Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|