aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorLluís <xscript@gmx.net>2011-08-31 20:31:31 +0200
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-09-01 10:34:54 +0100
commit23d15e860b33819ad76092fbb32577542fe0c44d (patch)
tree20c99fb621ab3c063c60029e69c8df744c6be0eb /vl.c
parent31965ae27bc11e90674be12584bb201b83df5aef (diff)
downloadqemu-23d15e860b33819ad76092fbb32577542fe0c44d.zip
qemu-23d15e860b33819ad76092fbb32577542fe0c44d.tar.gz
qemu-23d15e860b33819ad76092fbb32577542fe0c44d.tar.bz2
trace: add "-trace events" argument to control initial state
The "-trace events" argument can be used to provide a file with a list of trace event names that will be enabled prior to starting execution, thus providing early tracing. This saves the user from manually toggling event states through the monitor interface or whichever backend-specific interface. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 60322b6..c6dc689 100644
--- a/vl.c
+++ b/vl.c
@@ -2137,6 +2137,7 @@ 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);
@@ -2934,6 +2935,7 @@ int main(int argc, char **argv, char **envp)
if (!opts) {
exit(1);
}
+ trace_events = qemu_opt_get(opts, "events");
trace_file = qemu_opt_get(opts, "file");
break;
}
@@ -2994,7 +2996,7 @@ int main(int argc, char **argv, char **envp)
set_cpu_log(log_mask);
}
- if (!trace_backend_init(trace_file)) {
+ if (!trace_backend_init(trace_events, trace_file)) {
exit(1);
}