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/default.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/default.c')
-rw-r--r-- | trace/default.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/trace/default.c b/trace/default.c index 3573d5b..c9b27a2 100644 --- a/trace/default.c +++ b/trace/default.c @@ -25,8 +25,13 @@ 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) { + if (events) { + fprintf(stderr, "error: -trace events=...: " + "option not supported by the selected tracing backend\n"); + return false; + } if (file) { fprintf(stderr, "error: -trace file=...: " "option not supported by the selected tracing backend\n"); |