diff options
author | Pavankumar Kondeti <pkondeti@codeaurora.org> | 2016-12-09 21:50:17 +0530 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2016-12-12 13:51:02 -0500 |
commit | c59f29cb144a6a0dfac16ede9dc8eafc02dc56ca (patch) | |
tree | 54eb12f59132eea62dd2f71a9ddf3c56940d9aa1 /kernel/trace | |
parent | 1a41442864e35bff859582fe9c5d051d0b1040ba (diff) | |
download | blackbird-obmc-linux-c59f29cb144a6a0dfac16ede9dc8eafc02dc56ca.tar.gz blackbird-obmc-linux-c59f29cb144a6a0dfac16ede9dc8eafc02dc56ca.zip |
tracing: Use SOFTIRQ_OFFSET for softirq dectection for more accurate results
The 's' flag is supposed to indicate that a softirq is running. This
can be detected by testing the preempt_count with SOFTIRQ_OFFSET.
The current code tests the preempt_count with SOFTIRQ_MASK, which
would be true even when softirqs are disabled but not serving a
softirq.
Link: http://lkml.kernel.org/r/1481300417-3564-1-git-send-email-pkondeti@codeaurora.org
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 6f420d7b703b..970aafe80b49 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1949,7 +1949,7 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags, #endif ((pc & NMI_MASK ) ? TRACE_FLAG_NMI : 0) | ((pc & HARDIRQ_MASK) ? TRACE_FLAG_HARDIRQ : 0) | - ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) | + ((pc & SOFTIRQ_OFFSET) ? TRACE_FLAG_SOFTIRQ : 0) | (tif_need_resched() ? TRACE_FLAG_NEED_RESCHED : 0) | (test_preempt_need_resched() ? TRACE_FLAG_PREEMPT_RESCHED : 0); } |