trace: split trace_init_file out of trace_init_backends

This is cleaner, and improves error reporting with -daemonize.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-id: 1452174932-28657-4-git-send-email-den@openvz.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Paolo Bonzini 2016-01-07 16:55:24 +03:00 committed by Stefan Hajnoczi
parent 45bd0b41bd
commit 41fc57e44e
6 changed files with 38 additions and 17 deletions

View file

@ -157,7 +157,7 @@ static void trace_event_set_state_dynamic(TraceEvent *ev, bool state);
*
* Returns: Whether the backends could be successfully initialized.
*/
bool trace_init_backends(const char *file);
bool trace_init_backends(void);
/**
* trace_init_events:
@ -170,6 +170,17 @@ bool trace_init_backends(const char *file);
*/
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=...".
*
* Record the name of the output file for the tracing backend.
* Exits if no selected backend does not support specifying the
* output file, and a non-NULL file was passed.
*/
void trace_init_file(const char *file);
#include "trace/control-internal.h"