Patchwork [Tracing,2/2] More Trace events

login
register
mail settings
Submitter Prerna Saxena
Date Aug. 11, 2010, 11:46 a.m.
Message ID <20100811171603.60e79c96@zephyr>
Download mbox | patch
Permalink /patch/61471/
State New
Headers show

Comments

Prerna Saxena - Aug. 11, 2010, 11:46 a.m.
[PATCH 2/2] Trace event for tracking entry point of balloon request handler.


Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
 balloon.c    |    2 ++
 trace-events |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/balloon.c b/balloon.c
index 8e0b7f1..0021fef 100644
--- a/balloon.c
+++ b/balloon.c
@@ -29,6 +29,7 @@ 
 #include "cpu-common.h"
 #include "kvm.h"
 #include "balloon.h"
+#include "trace.h"
 
 
 static QEMUBalloonEvent *qemu_balloon_event;
@@ -43,6 +44,7 @@  void qemu_add_balloon_handler(QEMUBalloonEvent *func, void *opaque)
 int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque)
 {
     if (qemu_balloon_event) {
+        trace_balloon_event(qemu_balloon_event_opaque, target);
         qemu_balloon_event(qemu_balloon_event_opaque, target, cb, opaque);
         return 1;
     } else {
diff --git a/trace-events b/trace-events
index 7dbd08f..d0d9f50 100644
--- a/trace-events
+++ b/trace-events
@@ -63,3 +63,7 @@  paio_submit(void *acb, void *opaque, unsigned long sector_num, unsigned long nb_
 # ioport.c
 cpu_in(unsigned int addr, unsigned int val) "addr %u value %u"
 cpu_out(unsigned int addr, unsigned int val) "addr %u 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"