Patchwork [1/2] Add tracepoint for RunState transition

login
register
mail settings
Submitter Kazuya Saito
Date Feb. 6, 2013, 6:38 a.m.
Message ID <5111FA54.80200@jp.fujitsu.com>
Download mbox | patch
Permalink /patch/218539/
State New
Headers show

Comments

Kazuya Saito - Feb. 6, 2013, 6:38 a.m.
This patch enables us to know RunState transition. We only added a
trace function in runstate_set().

Signed-off-by: Kazuya Saito <saito.kazuya@jp.fujitsu.com>
---
 trace-events |    1 +
 vl.c         |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/trace-events b/trace-events
index 1011f27..bf508f0 100644
--- a/trace-events
+++ b/trace-events
@@ -472,6 +472,7 @@  scsi_request_sense(int target, int lun, int tag)
"target %d lun %d tag %d"

 # vl.c
 vm_state_notify(int running, int reason) "running %d reason %d"
+runstate_set(int new_state) "new state %d"

 # block/qcow2.c
 qcow2_writev_start_req(void *co, int64_t sector, int nb_sectors) "co %p
sector %" PRIx64 " nb_sectors %d"
diff --git a/vl.c b/vl.c
index a8dc73d..6ec571c 100644
--- a/vl.c
+++ b/vl.c
@@ -612,7 +612,7 @@  void runstate_set(RunState new_state)
                 RunState_lookup[new_state]);
         abort();
     }
-
+    trace_runstate_set(new_state);
     current_run_state = new_state;
 }