From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Pavankumar Kondeti <pkondeti@codeaurora.org>
Subject: [for-next][PATCH 1/5] tracing: Use SOFTIRQ_OFFSET for softirq dectection for more accurate results
Date: Tue, 13 Dec 2016 11:14:09 -0500 [thread overview]
Message-ID: <20161213161435.713332031@goodmis.org> (raw)
In-Reply-To: 20161213161408.374215860@goodmis.org
[-- Attachment #1: 0001-tracing-Use-SOFTIRQ_OFFSET-for-softirq-dectection-fo.patch --]
[-- Type: text/plain, Size: 1215 bytes --]
From: Pavankumar Kondeti <pkondeti@codeaurora.org>
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>
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
}
--
2.10.2
next prev parent reply other threads:[~2016-12-13 16:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 16:14 [for-next][PATCH 0/5] tracing: Hopefully last update for merge window Steven Rostedt
2016-12-13 16:14 ` Steven Rostedt [this message]
2016-12-13 16:14 ` [for-next][PATCH 2/5] tracing/rb: Init the CPU mask on allocation Steven Rostedt
2016-12-13 16:14 ` [for-next][PATCH 3/5] tracing/kprobes: Add a helper method to return number of probe hits Steven Rostedt
2016-12-13 16:14 ` [for-next][PATCH 4/5] kprobes/trace: Fix kprobe selftest for newer gcc Steven Rostedt
2016-12-13 16:14 ` [for-next][PATCH 5/5] selftests: ftrace: Shift down default message verbosity Steven Rostedt
2016-12-13 16:30 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161213161435.713332031@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pkondeti@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox