diff options
Diffstat (limited to 'kernel/trace/trace_events_trigger.c')
-rw-r--r-- | kernel/trace/trace_events_trigger.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c index f6dd115b958d..a53e0da7e333 100644 --- a/kernel/trace/trace_events_trigger.c +++ b/kernel/trace/trace_events_trigger.c @@ -742,13 +742,16 @@ traceon_trigger(struct event_trigger_data *data) static void traceon_count_trigger(struct event_trigger_data *data) { + if (tracing_is_on()) + return; + if (!data->count) return; if (data->count != -1) (data->count)--; - traceon_trigger(data); + tracing_on(); } static void @@ -763,13 +766,16 @@ traceoff_trigger(struct event_trigger_data *data) static void traceoff_count_trigger(struct event_trigger_data *data) { + if (!tracing_is_on()) + return; + if (!data->count) return; if (data->count != -1) (data->count)--; - traceoff_trigger(data); + tracing_off(); } static int |