linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] perf: improve script and record for iregs and brstack
@ 2015-08-31 16:41 Stephane Eranian
  2015-08-31 16:41 ` [PATCH v2 1/4] perf script: enable printing of interrupted machine state Stephane Eranian
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Stephane Eranian @ 2015-08-31 16:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: acme, peterz, mingo, ak, jolsa, namhyung, kan.liang, dsahern,
	adrian.hunter

This short series of patches improves perf record and perf script support
for interrupted machine state and branch stack.

this makes it easier to postprocess the data and narrow down the volume
and limit the overhead of capturing interrupt machine state registers.
For some analysis, only a subset of the registers is useful.

Changes:
   - Make --intr-regs accept register names to limit volume of data collected
   - Make perf script print interrupted machine register values with -F iregs
   - Make perf script print branch stack content with -F brstack

   $ perf record --intr-regs=\?
   available registers: AX BX CX DX SI DI BP SP IP FLAGS CS SS R8 R9 R10 R11 R12 R13 R14 R15 
   ...

   $ perf record --intr-regs=ax,bx,cx,dx,si ....

   $ perf script -F ip,iregs
   40afc2   AX:0x6c5770    BX:0x1e    CX:0x5f4d80a    DX:0x101010101010101    SI:0x1

   $ perf script -F ip,brstack
   5d3000 0x401aa0/0x5d2000/M/-/-/-/0 ...

 $ perf script -F ip,brstacksym
  4011e0 noploop+0x0/noploop+0x0/P/-/-/0

In V2, perf script adds brstacksym option to print the branch stack using symbolic names
for the from and to addresses. The brstack prints only raw addresses. For each entry,
the branch stacks flags are decoded, including the latency for Skylake systems.
The patch is rebased to tip.fit 4.2.0-rc7.

Stephane Eranian (4):
  perf script: enable printing of interrupted machine state
  perf/x86: add list of register names
  perf record: add ability to name registers to record
  perf script: enable printing of branch stack

 tools/perf/Documentation/perf-record.txt |   6 +-
 tools/perf/Documentation/perf-script.txt |  14 +++-
 tools/perf/arch/x86/util/Build           |   1 +
 tools/perf/arch/x86/util/perf_regs.c     |  31 +++++++++
 tools/perf/builtin-record.c              |   7 +-
 tools/perf/builtin-script.c              | 111 ++++++++++++++++++++++++++++++-
 tools/perf/perf.h                        |   2 +-
 tools/perf/util/Build                    |   1 +
 tools/perf/util/evsel.c                  |   2 +-
 tools/perf/util/parse-regs-options.c     |  71 ++++++++++++++++++++
 tools/perf/util/parse-regs-options.h     |   5 ++
 tools/perf/util/perf_regs.h              |   7 ++
 12 files changed, 250 insertions(+), 8 deletions(-)
 create mode 100644 tools/perf/arch/x86/util/perf_regs.c
 create mode 100644 tools/perf/util/parse-regs-options.c
 create mode 100644 tools/perf/util/parse-regs-options.h

-- 
1.9.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-10-30  9:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31 16:41 [PATCH v2 0/4] perf: improve script and record for iregs and brstack Stephane Eranian
2015-08-31 16:41 ` [PATCH v2 1/4] perf script: enable printing of interrupted machine state Stephane Eranian
2015-08-31 20:51   ` Arnaldo Carvalho de Melo
2015-09-01  8:31   ` [tip:perf/urgent] perf script: Enable " tip-bot for Stephane Eranian
2015-08-31 16:41 ` [PATCH v2 2/4] perf/x86: add list of register names Stephane Eranian
2015-09-01  8:31   ` [tip:perf/urgent] perf/x86: Add " tip-bot for Stephane Eranian
2015-08-31 16:41 ` [PATCH v2 3/4] perf record: add ability to name registers to record Stephane Eranian
2015-08-31 21:02   ` Arnaldo Carvalho de Melo
2015-09-01  8:32   ` [tip:perf/urgent] perf record: Add " tip-bot for Stephane Eranian
2015-08-31 16:41 ` [PATCH v2 4/4] perf script: enable printing of branch stack Stephane Eranian
2015-08-31 17:05   ` Andi Kleen
2015-08-31 17:08     ` Andi Kleen
2015-10-30  9:13   ` [tip:perf/core] perf script: Enable " tip-bot for Stephane Eranian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).