diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2016-11-23 20:28:38 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-11-23 20:30:51 -0500 |
commit | 52ffabe3848a1ebd944cdf7801a77247b1cb46d5 (patch) | |
tree | e1c9162bdf75f41d279a1361f240ead9cce2850c /kernel/trace/trace_functions_graph.c | |
parent | 4239174570da080f3623724d97062bf55de7e36b (diff) |
tracing: Make __buffer_unlock_commit() always_inline
The function __buffer_unlock_commit() is called in a few places outside of
trace.c. But for the most part, it should really be inlined, as it is in the
hot path of the trace_events. For the callers outside of trace.c, create a
new function trace_buffer_unlock_commit_nostack(), as the reason it was used
was to avoid the stack tracing that trace_buffer_unlock_commit() could do.
Link: http://lkml.kernel.org/r/20161121183700.GW26852@two.firstfloor.org
Reported-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
-rw-r--r-- | kernel/trace/trace_functions_graph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 4e480e870474..8e1a115439fa 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -358,7 +358,7 @@ int __trace_graph_entry(struct trace_array *tr, | |||
358 | entry = ring_buffer_event_data(event); | 358 | entry = ring_buffer_event_data(event); |
359 | entry->graph_ent = *trace; | 359 | entry->graph_ent = *trace; |
360 | if (!call_filter_check_discard(call, entry, buffer, event)) | 360 | if (!call_filter_check_discard(call, entry, buffer, event)) |
361 | __buffer_unlock_commit(buffer, event); | 361 | trace_buffer_unlock_commit_nostack(buffer, event); |
362 | 362 | ||
363 | return 1; | 363 | return 1; |
364 | } | 364 | } |
@@ -469,7 +469,7 @@ void __trace_graph_return(struct trace_array *tr, | |||
469 | entry = ring_buffer_event_data(event); | 469 | entry = ring_buffer_event_data(event); |
470 | entry->ret = *trace; | 470 | entry->ret = *trace; |
471 | if (!call_filter_check_discard(call, entry, buffer, event)) | 471 | if (!call_filter_check_discard(call, entry, buffer, event)) |
472 | __buffer_unlock_commit(buffer, event); | 472 | trace_buffer_unlock_commit_nostack(buffer, event); |
473 | } | 473 | } |
474 | 474 | ||
475 | void trace_graph_return(struct ftrace_graph_ret *trace) | 475 | void trace_graph_return(struct ftrace_graph_ret *trace) |