From fc764105397fa55e7c03f42a6d019063ec0cad00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs?= Date: Wed, 31 Aug 2011 20:31:18 +0200 Subject: trace: separate trace event control and query routines from the simple backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generalize the 'st_print_trace_events' and 'st_change_trace_event_state' into backend-specific 'trace_print_events' and 'trace_event_set_state' (respectively) in the "trace/control.h" file. Signed-off-by: LluĂ­s Vilanova --- monitor.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index 935aa33c87..2cff62d7b3 100644 --- a/monitor.c +++ b/monitor.c @@ -60,6 +60,7 @@ #ifdef CONFIG_TRACE_SIMPLE #include "trace.h" #endif +#include "trace/control.h" #include "ui/qemu-spice.h" //#define DEBUG @@ -593,11 +594,11 @@ static void do_help_cmd(Monitor *mon, const QDict *qdict) } #ifdef CONFIG_TRACE_SIMPLE -static void do_change_trace_event_state(Monitor *mon, const QDict *qdict) +static void do_trace_event_set_state(Monitor *mon, const QDict *qdict) { const char *tp_name = qdict_get_str(qdict, "name"); bool new_state = qdict_get_bool(qdict, "option"); - int ret = st_change_trace_event_state(tp_name, new_state); + int ret = trace_event_set_state(tp_name, new_state); if (!ret) { monitor_printf(mon, "unknown event name \"%s\"\n", tp_name); @@ -1002,9 +1003,9 @@ static void do_info_trace(Monitor *mon) st_print_trace((FILE *)mon, &monitor_fprintf); } -static void do_info_trace_events(Monitor *mon) +static void do_trace_print_events(Monitor *mon) { - st_print_trace_events((FILE *)mon, &monitor_fprintf); + trace_print_events((FILE *)mon, &monitor_fprintf); } #endif @@ -3148,7 +3149,7 @@ static const mon_cmd_t info_cmds[] = { .args_type = "", .params = "", .help = "show available trace-events & their state", - .mhandler.info = do_info_trace_events, + .mhandler.info = do_trace_print_events, }, #endif { -- cgit v1.2.3