summary refs log tree commit diff stats
path: root/scripts/simpletrace.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-04-21 14:36:45 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-04-21 14:36:45 +0100
commitaf7ec403b213544667cbc275926fa23b54e0cb02 (patch)
tree0c9fbff314226e068073532301b571f605a8b0d4 /scripts/simpletrace.py
parent09fc586db3b0917c3f5ad0c56e60920c5061422b (diff)
parent659370f71f2c3d4105b04178abd751242e1c1b68 (diff)
downloadfocaccia-qemu-af7ec403b213544667cbc275926fa23b54e0cb02.tar.gz
focaccia-qemu-af7ec403b213544667cbc275926fa23b54e0cb02.zip
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
# gpg: Signature made Fri 21 Apr 2017 10:52:18 BST
# gpg:                using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
  simpletrace: document Analyzer method signatures
  trace: Put all trace.o into libqemuutil.a
  configure: eliminate Python dependency for --help

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/simpletrace.py')
-rwxr-xr-xscripts/simpletrace.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index 4c990047b6..d60b3a08f7 100755
--- a/scripts/simpletrace.py
+++ b/scripts/simpletrace.py
@@ -116,7 +116,28 @@ class Analyzer(object):
     is invoked.
 
     If a method matching a trace event name exists, it is invoked to process
-    that trace record.  Otherwise the catchall() method is invoked."""
+    that trace record.  Otherwise the catchall() method is invoked.
+
+    Example:
+    The following method handles the runstate_set(int new_state) trace event::
+
+      def runstate_set(self, new_state):
+          ...
+
+    The method can also take a timestamp argument before the trace event
+    arguments::
+
+      def runstate_set(self, timestamp, new_state):
+          ...
+
+    Timestamps have the uint64_t type and are in nanoseconds.
+
+    The pid can be included in addition to the timestamp and is useful when
+    dealing with traces from multiple processes::
+
+      def runstate_set(self, timestamp, pid, new_state):
+          ...
+    """
 
     def begin(self):
         """Called at the start of the trace."""