diff options
author | Lluís <xscript@gmx.net> | 2011-08-31 20:31:31 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2011-09-01 10:34:54 +0100 |
commit | 23d15e860b33819ad76092fbb32577542fe0c44d (patch) | |
tree | 20c99fb621ab3c063c60029e69c8df744c6be0eb /trace/simple.c | |
parent | 31965ae27bc11e90674be12584bb201b83df5aef (diff) | |
download | qemu-23d15e860b33819ad76092fbb32577542fe0c44d.zip qemu-23d15e860b33819ad76092fbb32577542fe0c44d.tar.gz qemu-23d15e860b33819ad76092fbb32577542fe0c44d.tar.bz2 |
trace: add "-trace events" argument to control initial state
The "-trace events" argument can be used to provide a file with a list of trace
event names that will be enabled prior to starting execution, thus providing
early tracing.
This saves the user from manually toggling event states through the monitor
interface or whichever backend-specific interface.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Diffstat (limited to 'trace/simple.c')
-rw-r--r-- | trace/simple.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/trace/simple.c b/trace/simple.c index 70689e9..a609368 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -331,7 +331,7 @@ bool trace_event_set_state(const char *name, bool state) return false; } -bool trace_backend_init(const char *file) +bool trace_backend_init(const char *events, const char *file) { pthread_t thread; pthread_attr_t attr; @@ -350,6 +350,7 @@ bool trace_backend_init(const char *file) fprintf(stderr, "warning: unable to initialize simple trace backend\n"); } else { atexit(st_flush_trace_buffer); + trace_backend_init_events(events); st_set_trace_file(file); } |