mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, mingo@elte.hu, acme@redhat.com,
	jolsa@redhat.com, namhyung@kernel.org, dsahern@gmail.com
Subject: [PATCH v3 5/6] perf record: add new -I option to sample interrupted machine state
Date: Mon, 18 Aug 2014 01:18:19 +0200	[thread overview]
Message-ID: <1408317500-28146-6-git-send-email-eranian@google.com> (raw)
In-Reply-To: <1408317500-28146-1-git-send-email-eranian@google.com>

Add -I/--intr-regs option to capture machine state registers at
interrupt.

Add the corresponding man page description

Signed-off-by: Stephane Eranian <eranian@google.com>
---
 tools/perf/Documentation/perf-record.txt |    6 ++++++
 tools/perf/builtin-record.c              |    2 ++
 2 files changed, 8 insertions(+)

diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index d460049..1a36259 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -214,6 +214,12 @@ if combined with -a or -C options.
 After starting the program, wait msecs before measuring. This is useful to
 filter out the startup phase of the program, which is often very different.
 
+-I::
+--intr-regs::
+Capture machine state (registers) at interrupt, i.e., on counter overflows for
+each sample. List of captured registers depends on the architecture. This option
+is off by default.
+
 SEE ALSO
 --------
 linkperf:perf-stat[1], linkperf:perf-list[1]
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 4db670d..8dc1fd8 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -882,6 +882,8 @@ const struct option record_options[] = {
 		    "sample transaction flags (special events only)"),
 	OPT_BOOLEAN(0, "per-thread", &record.opts.target.per_thread,
 		    "use per-thread mmaps"),
+	OPT_BOOLEAN('I', "intr-regs", &record.opts.sample_intr_regs,
+		    "Sample machine registers on interrupt"),
 	OPT_END()
 };
 
-- 
1.7.9.5


  parent reply	other threads:[~2014-08-17 23:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-17 23:18 [PATCH v3 0/6] perf: add ability " Stephane Eranian
2014-08-17 23:18 ` [PATCH v3 1/6] perf: add ability to sample machine state on interrupt Stephane Eranian
2014-08-26  8:23   ` Namhyung Kim
2014-08-17 23:18 ` [PATCH v3 2/6] perf/x86: add support for sampling PEBS machine state registers Stephane Eranian
2014-08-17 23:18 ` [PATCH v3 3/6] perf tools: add core support for sampling intr machine state regs Stephane Eranian
2014-08-17 23:18 ` [PATCH v3 4/6] perf/tests: add interrupted state sample parsing test Stephane Eranian
2014-08-17 23:18 ` Stephane Eranian [this message]
2014-08-17 23:18 ` [PATCH v3 6/6] perf: improve perf_sample_data struct layout Stephane Eranian
2014-09-03  9:42 ` [PATCH v3 0/6] perf: add ability to sample interrupted machine state Stephane Eranian

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=1408317500-28146-6-git-send-email-eranian@google.com \
    --to=eranian@google.com \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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®