aboutsummaryrefslogtreecommitdiff
path: root/trace/control.c
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2014-05-21 18:16:01 +1000
committerStefan Hajnoczi <stefanha@redhat.com>2014-06-09 15:43:40 +0200
commit82432638ebeedda8a2e18838b6fbef4b14a94f31 (patch)
treef2352614a155b0cb9b4d9d25d3c5cf08abcba0a2 /trace/control.c
parent80ff35cd3ff451e8f200413ddf27816058630c1f (diff)
downloadqemu-arm-82432638ebeedda8a2e18838b6fbef4b14a94f31.tar.gz
trace: Replace error with warning if event is not defined
At the moment QEMU exits if trace point is not defined which makes a developer life harder if he has to switch between branches with different traces implemented. This replaces error+exit wit WARNING if the tracepoint does not exist or not traceable. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace/control.c')
-rw-r--r--trace/control.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/trace/control.c b/trace/control.c
index 49f61e137b..4aa02cf2d6 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -112,15 +112,15 @@ void trace_backend_init_events(const char *fname)
TraceEvent *ev = trace_event_name(line_ptr);
if (ev == NULL) {
fprintf(stderr,
- "error: trace event '%s' does not exist\n", line_ptr);
- exit(1);
- }
- if (!trace_event_get_state_static(ev)) {
+ "WARNING: trace event '%s' does not exist\n",
+ line_ptr);
+ } else if (!trace_event_get_state_static(ev)) {
fprintf(stderr,
- "error: trace event '%s' is not traceable\n", line_ptr);
- exit(1);
+ "WARNING: trace event '%s' is not traceable\n",
+ line_ptr);
+ } else {
+ trace_event_set_state_dynamic(ev, enable);
}
- trace_event_set_state_dynamic(ev, enable);
}
}
}