Skip to content

perf tools: improve branch stack sampling

Stephane Eranian lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4perf record: provide default branch stack sampling mode optiontools/perf/Documentation/perf-record.txt tools/perf/builtin-record.c+57 -341 reply
2/4perf record: add HEADER_BRANCH_STACK tagtools/perf/builtin-record.c tools/perf/util/header.c tools/perf/util/header.h+17 -11 reply
3/4perf report: auto-detect branch stack sampling modetools/perf/Documentation/perf-report.txt tools/perf/builtin-report.c tools/perf/util/sort.c +1 more+41 -201 reply
4/4perf report: enable TUI in branch view modetools/perf/builtin-report.c tools/perf/util/session.c tools/perf/util/sort.h +2 more+111 -381 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] perf tools: improve branch stack sampling

This patch set improves upon my LBR v6 patch series posted on LKML several weeks ago. It needs to be applied on top of it.

This series improves perf report and perf record when used with taken branch stack sampling.

For perf record, and based on users' feedback, it is possible to omit the branch type with the -b option. In that case, the filter is set to the default value of any branch type. The branch-filter option is now used to specify more precise branch types and privilege levels:

   $ perf record -b foo
   equivalent to:
   $ perf record --branch-filter any foo

To filter on specific branch types:

   $ perf record --branch-filter any_call foo

For perf report, it is now possible to omit the -b option and yet get branch view mode. Perf report is able to auto-detect if the perf.data file contains samples with branch stack and to switch to the branch mode. It is possible to override this by passing --no-branch-stack.

Furthermore, perf report now supports TUI in branch mode. It is possible to naviguate to both the source and destination functions of branches.

Stephane Eranian (4):
perf record: provide default branch stack sampling mode option perf record: add HEADER_BRANCH_STACK tag
perf report: auto-detect branch stack sampling mode perf report: enable TUI in branch view mode

 tools/perf/Documentation/perf-record.txt |   23 ++++--
 tools/perf/Documentation/perf-report.txt |    7 +-
 tools/perf/builtin-record.c              |   71 +++++++++++------
 tools/perf/builtin-report.c              |  121 ++++++++++++++++++++---------
 tools/perf/util/header.c                 |   13 +++
 tools/perf/util/header.h                 |    2 +-
 tools/perf/util/session.c                |    1 +
 tools/perf/util/sort.c                   |    2 +-
 tools/perf/util/sort.h                   |    8 +-
 tools/perf/util/symbol.h                 |    7 ++-
 tools/perf/util/ui/browsers/hists.c      |   62 ++++++++++++---
 11 files changed, 225 insertions(+), 92 deletions(-)
Signature · 1 line
1.7.4.1