From: Joel Fernandes <joelaf@google.com>
To: linux-kernel@vger.kernel.org
Cc: kernel-team@android.com, Joel Fernandes <joelaf@google.com>,
Steven Rostedt <rostedt@goodmis.org>,
Peter Zilstra <peterz@infradead.org>
Subject: [PATCH v7 0/2] tracing: Add trace events for preemption and irq disable/enable
Date: Fri, 29 Sep 2017 14:21:42 -0700 [thread overview]
Message-ID: <20170929212144.24039-1-joelaf@google.com> (raw)
These patches add trace events support for preempt and irq disable/enable
events.
Here's an example of how Android's systrace will be using it to show atomic
sections as a gantt chart: http://imgur.com/download/TZplEVp
Other advantages of this initial work could be rewriting of preemptirqs off
tracer to use trace events, and replacing kprobes with tracepoint hooks for
these events in BPF samples (see samples/bpf/lathist_kern.c).
Changes since v6:
1. Drop the stop_critical_timings changes - previous patch was generating the
preempt_enable/disable events. Instead since we already have cpuidle trace
events, we can just rely on those for now to understand how much time was spent
in idle. A future patch could do something smarter.
2. Drop the per-cpu variable usage from trace_preempt_enable/disable.
The trace_preempt_enable/disable calls don't nest, so there's no need
to protect it with a per-cpu variable.
3. trace_irq_enable/disable on the other hand are called in this way,
so I added some comments about why per-cpu variable is needed.
Joel Fernandes (2):
tracing: Prepare to add preempt and irq trace events
tracing: Add support for preempt and irq enable/disable events
include/linux/ftrace.h | 3 +-
include/trace/events/preemptirq.h | 66 ++++++++++++++++++
kernel/trace/Kconfig | 9 +++
kernel/trace/Makefile | 1 +
kernel/trace/trace_irqsoff.c | 139 +++++++++++++++++++++++++++++++-------
5 files changed, 191 insertions(+), 27 deletions(-)
create mode 100644 include/trace/events/preemptirq.h
Links to earlier series:
v6: https://lkml.org/lkml/2017/9/21/789
v5: https://lkml.org/lkml/2017/9/12/507
v4: https://lkml.org/lkml/2017/9/6/724
v3: https://lkml.org/lkml/2017/9/3/15
Cc: kernel-team@android.com
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zilstra <peterz@infradead.org>
--
2.14.2.822.g60be5d43e6-goog
reply other threads:[~2017-09-29 21:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170929212144.24039-1-joelaf@google.com \
--to=joelaf@google.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®