diff options
author | Peter Zijlstra <[email protected]> | 2020-02-12 21:01:16 +0100 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2020-05-19 15:51:18 +0200 |
commit | f93524eb9c54f49be150167918f6546b0a2e09b1 (patch) | |
tree | 2c480d01f1f014baf454abb8ce8f52adac0ad6d4 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 178ba00c354eb15cec6806a812771e60a5ae3ea1 (diff) |
sched,rcu,tracing: Avoid tracing before in_nmi() is correct
If a tracer is invoked before in_nmi() becomes true, the tracer can no
longer detect it is called from NMI context and behave correctly.
Therefore change nmi_{enter,exit}() to use __preempt_count_{add,sub}()
as the normal preempt_count_{add,sub}() have a (desired) function
trace entry.
This fixes a potential issue with the current code; when the function-tracer
has stack-tracing enabled __trace_stack() will malfunction when it hits the
preempt_count_add() function entry from NMI context.
Suggested-by: Steven Rostedt (VMware) <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Steven Rostedt (VMware) <[email protected]>
Reviewed-by: Alexandre Chartre <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions