Skip to content

perf: Support the deferred unwinding infrastructure

Steven Rostedt bpf linux-trace-kernel lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v12 Latest11 patches 5 repliesIn review
  2. v1111 patches 3 repliesSuperseded
  3. v1011 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v911 patches0 repliesSuperseded

Patches in v12 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11perf: Remove get_perf_callchain() init_nr argumentinclude/linux/perf_event.h kernel/bpf/stackmap.c kernel/events/callchain.c +1 more+10 -100 replies
2/11perf: Have get_perf_callchain() return NULL if crosstask and user are setkernel/events/callchain.c+5 -50 replies
3/11perf: Use current->flags & PF_KTHREAD|PF_USER_WORKER instead of current->mm == NULLkernel/events/callchain.c kernel/events/core.c+5 -50 replies
4/11perf: Simplify get_perf_callchain() user logickernel/events/callchain.c+8 -100 replies
5/11perf: Skip user unwind if the task is a kernel threadkernel/events/core.c+2 -10 replies
6/11perf: Support deferred user callchainsinclude/linux/perf_event.h include/uapi/linux/perf_event.h kernel/bpf/stackmap.c +3 more+201 -80 replies
7/11perf: Support deferred user callchains for per CPU eventsinclude/linux/perf_event.h kernel/events/core.c+284 -261 reply
8/11perf tools: Minimal CALLCHAIN_DEFERRED supporttools/lib/perf/include/perf/event.h tools/perf/util/event.c tools/perf/util/evsel.c +6 more+47 -22 replies
9/11perf record: Enable defer_callchain for user callchainstools/perf/util/evsel.c tools/perf/util/evsel.h+25 -00 replies
10/11perf script: Display PERF_RECORD_CALLCHAIN_DEFERREDtools/perf/builtin-script.c+89 -00 replies
11/11perf tools: Merge deferred user callchainstools/perf/Documentation/perf-script.txt tools/perf/builtin-script.c tools/perf/util/callchain.c +6 more+102 -20 replies

Reviews trailers per patch

2 of 11 patches have a Reviewed-by or Acked-by.

PatchNamhyung KimAlexei Starovoitov
1/11A-b A-b
2/11
3/11
4/11A-b
5/11
6/11
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v12 thread

Cover letter [PATCH v12 00/11] perf: Support the deferred unwinding infrastructure

This is based on top of the deferred unwind core patch series:

https://lore.kernel.org/linux-trace-kernel/[email protected]/
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git unwind/core

This series implements the perf interface to use deferred user space stack tracing.

The code can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git unwind/perf

Head SHA1: e00f51618c68b5b6fd6054488212504592c9e392

Changes since v11: https://lore.kernel.org/linux-trace-kernel/[email protected]/

- Also check against PF_USER_WORKER as io workers do not have PF_KTHREAD set.

- Removed deferred_request_nmi() and have NMIs just use the normal deferred_request() function. As Peter Zijlstra has stated, in_nmi() can nest because some exceptions set in_nmi() and a real NMI could come in.

Josh Poimboeuf (5):
perf: Remove get_perf_callchain() init_nr argument
perf: Have get_perf_callchain() return NULL if crosstask and user are set
perf: Simplify get_perf_callchain() user logic
perf: Skip user unwind if the task is a kernel thread
perf: Support deferred user callchains

Namhyung Kim (4):
perf tools: Minimal CALLCHAIN_DEFERRED support perf record: Enable defer_callchain for user callchains perf script: Display PERF_RECORD_CALLCHAIN_DEFERRED perf tools: Merge deferred user callchains

Steven Rostedt (2):
perf: Use current->flags & PF_KTHREAD|PF_USER_WORKER instead of current->mm == NULL
perf: Support deferred user callchains for per CPU events

----

 include/linux/perf_event.h                |  13 +-
 include/uapi/linux/perf_event.h           |  19 +-
 kernel/bpf/stackmap.c                     |   8 +-
 kernel/events/callchain.c                 |  49 ++--
 kernel/events/core.c                      | 410 +++++++++++++++++++++++++++++-
 tools/include/uapi/linux/perf_event.h     |  19 +-
 tools/lib/perf/include/perf/event.h       |   7 +
 tools/perf/Documentation/perf-script.txt  |   5 +
 tools/perf/builtin-script.c               |  92 +++++++
 tools/perf/util/callchain.c               |  24 ++
 tools/perf/util/callchain.h               |   3 +
 tools/perf/util/event.c                   |   1 +
 tools/perf/util/evlist.c                  |   1 +
 tools/perf/util/evlist.h                  |   1 +
 tools/perf/util/evsel.c                   |  39 +++
 tools/perf/util/evsel.h                   |   1 +
 tools/perf/util/machine.c                 |   1 +
 tools/perf/util/perf_event_attr_fprintf.c |   1 +
 tools/perf/util/sample.h                  |   3 +-
 tools/perf/util/session.c                 |  78 ++++++
 tools/perf/util/tool.c                    |   2 +
 tools/perf/util/tool.h                    |   4 +-
 22 files changed, 745 insertions(+), 36 deletions(-)