aboutsummaryrefslogtreecommitdiff
path: root/trace/control.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-11-19 08:32:03 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-11-19 08:32:03 -0600
commitc562d15d318e4ad9293032553472da71039a270f (patch)
tree90f67af2cabd386408bf071e1b44b876f423a857 /trace/control.c
parent698229eb284ae29dcaae2c686cbf5dcf02f783ad (diff)
parente94c4c9287392e9c4de5e9cc3a0fa40da959ccb5 (diff)
Merge remote-tracking branch 'stefanha/tracing' into staging
* stefanha/tracing: trace: Remove "info trace" from documents trace: document '-' syntax for disabling events trace: allow disabling events in events file Avoid all systemtap reserved words Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'trace/control.c')
-rw-r--r--trace/control.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/trace/control.c b/trace/control.c
index 22d5863eeb..be05efb99b 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -12,6 +12,8 @@
void trace_backend_init_events(const char *fname)
{
+ int ret;
+
if (fname == NULL) {
return;
}
@@ -30,7 +32,12 @@ void trace_backend_init_events(const char *fname)
if ('#' == line_buf[0]) { /* skip commented lines */
continue;
}
- if (!trace_event_set_state(line_buf, true)) {
+ if ('-' == line_buf[0]) {
+ ret = trace_event_set_state(line_buf+1, false);
+ } else {
+ ret = trace_event_set_state(line_buf, true);
+ }
+ if (!ret) {
fprintf(stderr,
"error: trace event '%s' does not exist\n", line_buf);
exit(1);