From 23d15e860b33819ad76092fbb32577542fe0c44d Mon Sep 17 00:00:00 2001 From: Lluís Date: Wed, 31 Aug 2011 20:31:31 +0200 Subject: trace: add "-trace events" argument to control initial state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- trace/default.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'trace/default.c') 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"); -- cgit v1.2.3