diff options
Diffstat (limited to 'kernel/trace/trace_power.c')
-rw-r--r-- | kernel/trace/trace_power.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/trace_power.c b/kernel/trace/trace_power.c index 118439709fb7..8a30d9874cd4 100644 --- a/kernel/trace/trace_power.c +++ b/kernel/trace/trace_power.c | |||
@@ -36,6 +36,7 @@ static void probe_power_start(struct power_trace *it, unsigned int type, | |||
36 | 36 | ||
37 | static void probe_power_end(struct power_trace *it) | 37 | static void probe_power_end(struct power_trace *it) |
38 | { | 38 | { |
39 | struct ftrace_event_call *call = &event_power; | ||
39 | struct ring_buffer_event *event; | 40 | struct ring_buffer_event *event; |
40 | struct trace_power *entry; | 41 | struct trace_power *entry; |
41 | struct trace_array_cpu *data; | 42 | struct trace_array_cpu *data; |
@@ -54,7 +55,8 @@ static void probe_power_end(struct power_trace *it) | |||
54 | goto out; | 55 | goto out; |
55 | entry = ring_buffer_event_data(event); | 56 | entry = ring_buffer_event_data(event); |
56 | entry->state_data = *it; | 57 | entry->state_data = *it; |
57 | trace_buffer_unlock_commit(tr, event, 0, 0); | 58 | if (!filter_check_discard(call, entry, tr->buffer, event)) |
59 | trace_buffer_unlock_commit(tr, event, 0, 0); | ||
58 | out: | 60 | out: |
59 | preempt_enable(); | 61 | preempt_enable(); |
60 | } | 62 | } |
@@ -62,6 +64,7 @@ static void probe_power_end(struct power_trace *it) | |||
62 | static void probe_power_mark(struct power_trace *it, unsigned int type, | 64 | static void probe_power_mark(struct power_trace *it, unsigned int type, |
63 | unsigned int level) | 65 | unsigned int level) |
64 | { | 66 | { |
67 | struct ftrace_event_call *call = &event_power; | ||
65 | struct ring_buffer_event *event; | 68 | struct ring_buffer_event *event; |
66 | struct trace_power *entry; | 69 | struct trace_power *entry; |
67 | struct trace_array_cpu *data; | 70 | struct trace_array_cpu *data; |
@@ -84,7 +87,8 @@ static void probe_power_mark(struct power_trace *it, unsigned int type, | |||
84 | goto out; | 87 | goto out; |
85 | entry = ring_buffer_event_data(event); | 88 | entry = ring_buffer_event_data(event); |
86 | entry->state_data = *it; | 89 | entry->state_data = *it; |
87 | trace_buffer_unlock_commit(tr, event, 0, 0); | 90 | if (!filter_check_discard(call, entry, tr->buffer, event)) |
91 | trace_buffer_unlock_commit(tr, event, 0, 0); | ||
88 | out: | 92 | out: |
89 | preempt_enable(); | 93 | preempt_enable(); |
90 | } | 94 | } |