aboutsummaryrefslogtreecommitdiff
path: root/trace/control.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-11-02 06:58:41 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2020-11-11 13:08:09 +0000
commit92eecfff32763ee138f4cebc1a12c5b051ad5bb5 (patch)
tree3b74701f9b1b6301b6e0a972eb7cc6bba22ad823 /trace/control.c
parentc6f28ed5075df79fef39c500362a3f4089256c9c (diff)
downloadqemu-92eecfff32763ee138f4cebc1a12c5b051ad5bb5.zip
qemu-92eecfff32763ee138f4cebc1a12c5b051ad5bb5.tar.gz
qemu-92eecfff32763ee138f4cebc1a12c5b051ad5bb5.tar.bz2
trace: remove argument from trace_init_file
It is not needed, all the callers are just saving what was retrieved from -trace and trace_init_file can retrieve it on its own. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 20201102115841.4017692-1-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace/control.c')
-rw-r--r--trace/control.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/trace/control.c b/trace/control.c
index 5669db7..b82fb87 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -222,8 +222,10 @@ static void trace_init_events(const char *fname)
loc_pop(&loc);
}
-void trace_init_file(const char *file)
+void trace_init_file(void)
{
+ QemuOpts *opts = qemu_find_opts_singleton("trace");
+ const char *file = qemu_opt_get(opts, "file");
#ifdef CONFIG_TRACE_SIMPLE
st_set_trace_file(file);
if (init_trace_on_startup) {
@@ -289,9 +291,8 @@ bool trace_init_backends(void)
return true;
}
-char *trace_opt_parse(const char *optarg)
+void trace_opt_parse(const char *optarg)
{
- char *trace_file;
QemuOpts *opts = qemu_opts_parse_noisily(qemu_find_opts("trace"),
optarg, true);
if (!opts) {
@@ -301,11 +302,8 @@ char *trace_opt_parse(const char *optarg)
trace_enable_events(qemu_opt_get(opts, "enable"));
}
trace_init_events(qemu_opt_get(opts, "events"));
- trace_file = g_strdup(qemu_opt_get(opts, "file"));
init_trace_on_startup = true;
qemu_opts_del(opts);
-
- return trace_file;
}
uint32_t trace_get_vcpu_event_count(void)