#include <pthread.h>
#include "qemu-timer.h"
#include "trace.h"
+#include "trace/control.h"
/** Trace file header event ID */
#define HEADER_EVENT_ID (~(uint64_t)0) /* avoids conflicting with TraceEventIDs */
flush_trace_file(true);
}
-bool st_init(const char *file)
+bool trace_backend_init(const char *file)
{
pthread_t thread;
pthread_attr_t attr;
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
if (ret != 0) {
- return false;
+ fprintf(stderr, "warning: unable to initialize simple trace backend\n");
+ } else {
+ atexit(st_flush_trace_buffer);
+ st_set_trace_file(file);
}
- atexit(st_flush_trace_buffer);
- st_set_trace_file(file);
return true;
}