summaryrefslogtreecommitdiff
path: root/trace/default.c
diff options
context:
space:
mode:
authorLluís <xscript@gmx.net>2011-08-31 20:31:31 +0200
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-09-01 10:34:54 +0100
commit23d15e860b33819ad76092fbb32577542fe0c44d (patch)
tree20c99fb621ab3c063c60029e69c8df744c6be0eb /trace/default.c
parent31965ae27bc11e90674be12584bb201b83df5aef (diff)
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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/trace/default.c b/trace/default.c
index 3573d5b296..c9b27a289b 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");