From 23d15e860b33819ad76092fbb32577542fe0c44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs?= <xscript@gmx.net> 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 <vilanova@ac.upc.edu> --- trace/control.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'trace/control.h') diff --git a/trace/control.h b/trace/control.h index c99b4d5..2acaa42 100644 --- a/trace/control.h +++ b/trace/control.h @@ -24,10 +24,18 @@ bool trace_event_set_state(const char *name, bool state); /** Initialize the tracing backend. * - * @file Name of trace output file; may be NULL. - * Corresponds to commandline option "-trace file=...". + * @events Name of file with events to be enabled at startup; may be NULL. + * Corresponds to commandline option "-trace events=...". + * @file Name of trace output file; may be NULL. + * Corresponds to commandline option "-trace file=...". * @return Whether the backend could be successfully initialized. */ -bool trace_backend_init(const char *file); +bool trace_backend_init(const char *events, const char *file); + +/** Generic function to initialize the state of events. + * + * @fname Name of file with events to enable; may be NULL. + */ +void trace_backend_init_events(const char *fname); #endif /* TRACE_CONTROL_H */ -- cgit v1.1