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/simple.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'trace/simple.c') diff --git a/trace/simple.c b/trace/simple.c index 70689e948..a6093682d 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); } -- cgit v1.2.3