From 5b337780a44199262335f7d72815418d0d0a0fa1 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 10 May 2012 15:55:43 -0400 Subject: [PATCH] --- yaml --- r: 300293 b: refs/heads/master c: 9b63776fa3ca96c4ecda76f6fa947b7b0add66ac h: refs/heads/master i: 300291: d43241f6670347d224bc3125bf65a2a258e20eae v: v3 --- [refs] | 2 +- trunk/include/linux/ftrace_event.h | 2 ++ trunk/kernel/trace/trace_events.c | 5 ++++- trunk/kernel/trace/trace_export.c | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index cfb6d02cd6d0..3f8e4abfa9b2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 20d23aaa31da295378abff4272716e3dfc72baf0 +refs/heads/master: 9b63776fa3ca96c4ecda76f6fa947b7b0add66ac diff --git a/trunk/include/linux/ftrace_event.h b/trunk/include/linux/ftrace_event.h index 5f3f3be5af09..176a939d1547 100644 --- a/trunk/include/linux/ftrace_event.h +++ b/trunk/include/linux/ftrace_event.h @@ -179,6 +179,7 @@ enum { TRACE_EVENT_FL_RECORDED_CMD_BIT, TRACE_EVENT_FL_CAP_ANY_BIT, TRACE_EVENT_FL_NO_SET_FILTER_BIT, + TRACE_EVENT_FL_IGNORE_ENABLE_BIT, }; enum { @@ -187,6 +188,7 @@ enum { TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT), TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT), TRACE_EVENT_FL_NO_SET_FILTER = (1 << TRACE_EVENT_FL_NO_SET_FILTER_BIT), + TRACE_EVENT_FL_IGNORE_ENABLE = (1 << TRACE_EVENT_FL_IGNORE_ENABLE_BIT), }; struct ftrace_event_call { diff --git a/trunk/kernel/trace/trace_events.c b/trunk/kernel/trace/trace_events.c index 079a93ae8a9d..29111da1d100 100644 --- a/trunk/kernel/trace/trace_events.c +++ b/trunk/kernel/trace/trace_events.c @@ -294,6 +294,9 @@ static int __ftrace_set_clr_event(const char *match, const char *sub, if (!call->name || !call->class || !call->class->reg) continue; + if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) + continue; + if (match && strcmp(match, call->name) != 0 && strcmp(match, call->class->system) != 0) @@ -1164,7 +1167,7 @@ event_create_dir(struct ftrace_event_call *call, struct dentry *d_events, return -1; } - if (call->class->reg) + if (call->class->reg && !(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) trace_create_file("enable", 0644, call->dir, call, enable); diff --git a/trunk/kernel/trace/trace_export.c b/trunk/kernel/trace/trace_export.c index 3dd15e8bc856..e039906b037d 100644 --- a/trunk/kernel/trace/trace_export.c +++ b/trunk/kernel/trace/trace_export.c @@ -180,6 +180,7 @@ struct ftrace_event_call __used event_##call = { \ .event.type = etype, \ .class = &event_class_ftrace_##call, \ .print_fmt = print, \ + .flags = TRACE_EVENT_FL_IGNORE_ENABLE, \ }; \ struct ftrace_event_call __used \ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call;