diff options
| author | Peter Zijlstra <[email protected]> | 2020-02-12 20:01:16 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2020-05-19 13:51:18 +0000 |
| commit | f93524eb9c54f49be150167918f6546b0a2e09b1 (patch) | |
| tree | 2c480d01f1f014baf454abb8ce8f52adac0ad6d4 /tools/perf/scripts/python/sched-migration.py | |
| parent | sh/ftrace: Move arch_ftrace_nmi_{enter,exit} into nmi exception (diff) | |
| download | kernel-f93524eb9c54f49be150167918f6546b0a2e09b1.tar.gz kernel-f93524eb9c54f49be150167918f6546b0a2e09b1.zip | |
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/sched-migration.py')
0 files changed, 0 insertions, 0 deletions
