diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-09-02 10:08:48 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-09-02 10:08:48 -0500 |
commit | 88adbdfdf4b33210ba7acb0a30c292d301ca1554 (patch) | |
tree | a8d34fce10ab6a69f2712cca8456ba57a72678e1 /vl.c | |
parent | 625f9e1f54cd78ee98ac22030da527c9a1cc9d2b (diff) | |
parent | d8e8ef4ee05bfee0df84e2665d9196c4a954c095 (diff) | |
download | qemu-88adbdfdf4b33210ba7acb0a30c292d301ca1554.tar.gz qemu-88adbdfdf4b33210ba7acb0a30c292d301ca1554.tar.bz2 qemu-88adbdfdf4b33210ba7acb0a30c292d301ca1554.zip |
Merge remote-tracking branch 'stefanha/tracing' into staging
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -158,7 +158,7 @@ int main(int argc, char **argv) #include "slirp/libslirp.h" #include "trace.h" -#include "simpletrace.h" +#include "trace/control.h" #include "qemu-queue.h" #include "cpus.h" #include "arch_init.h" @@ -2204,7 +2204,6 @@ int main(int argc, char **argv, char **envp) int show_vnc_port = 0; #endif int defconfig = 1; - const char *trace_file = NULL; const char *log_mask = NULL; const char *log_file = NULL; GMemVTable mem_trace = { @@ -2212,6 +2211,8 @@ int main(int argc, char **argv, char **envp) .realloc = realloc_and_trace, .free = free_and_trace, }; + const char *trace_events = NULL; + const char *trace_file = NULL; atexit(qemu_run_exit_notifiers); error_set_progname(argv[0]); @@ -3002,14 +3003,16 @@ int main(int argc, char **argv, char **envp) } xen_mode = XEN_ATTACH; break; -#ifdef CONFIG_SIMPLE_TRACE case QEMU_OPTION_trace: + { opts = qemu_opts_parse(qemu_find_opts("trace"), optarg, 0); - if (opts) { - trace_file = qemu_opt_get(opts, "file"); + if (!opts) { + exit(1); } + trace_events = qemu_opt_get(opts, "events"); + trace_file = qemu_opt_get(opts, "file"); break; -#endif + } case QEMU_OPTION_readconfig: { int ret = qemu_read_config_file(optarg); @@ -3067,8 +3070,8 @@ int main(int argc, char **argv, char **envp) set_cpu_log(log_mask); } - if (!st_init(trace_file)) { - fprintf(stderr, "warning: unable to initialize simple trace backend\n"); + if (!trace_backend_init(trace_events, trace_file)) { + exit(1); } /* If no data_dir is specified then try to find it relative to the |