diff options
author | Denis V. Lunev <den@openvz.org> | 2016-06-17 17:44:10 +0300 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2016-06-28 21:14:12 +0100 |
commit | e9e0bb2af2248eabafb54402e3127f9f8a8690f5 (patch) | |
tree | c3d12e495c54d54b3006eff6435c031933114216 /trace/control.h | |
parent | eeb2b8f78d614e0245c978d0da8beaba49a89f2e (diff) |
trace: move qemu_trace_opts to trace/control.c
The patch also creates trace_opt_parse() helper in trace/control.c to reuse
this code in next patches for qemu-nbd and qemu-io.
The patch also makes trace_init_events() static, as this call is not used
outside the module anymore.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1466174654-30130-4-git-send-email-den@openvz.org
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace/control.h')
-rw-r--r-- | trace/control.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/trace/control.h b/trace/control.h index e2ba6d4de1..a2dd3eaedf 100644 --- a/trace/control.h +++ b/trace/control.h @@ -160,17 +160,6 @@ static void trace_event_set_state_dynamic(TraceEvent *ev, bool state); bool trace_init_backends(void); /** - * trace_init_events: - * @events: Name of file with events to be enabled at startup; may be NULL. - * Corresponds to commandline option "-trace events=...". - * - * Read the list of enabled tracing events. - * - * Returns: Whether the backends could be successfully initialized. - */ -void trace_init_events(const char *file); - -/** * trace_init_file: * @file: Name of trace output file; may be NULL. * Corresponds to commandline option "-trace file=...". @@ -197,6 +186,20 @@ void trace_list_events(void); */ void trace_enable_events(const char *line_buf); +/** + * Definition of QEMU options describing trace subsystem configuration + */ +extern QemuOptsList qemu_trace_opts; + +/** + * trace_opt_parse: + * @optarg: A string argument of --trace command line argument + * + * Initialize tracing subsystem. + * + * Returns the filename to save trace to. It must be freed with g_free(). + */ +char *trace_opt_parse(const char *optarg); #include "trace/control-internal.h" |