Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1406621
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v5 0/8] perf tools: Support overwritable ring buffer |
| Date | 2016-05-25 07:10 +0200 |
| Message-ID | <rCzeV-5mD-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
This patch set enables daemonized perf recording by utilizing
overwritable backward ring buffer. With this feature one can
put perf background, and dump ring buffer records by a SIGUSR2
when he/she find something unusual. For example, following
command record system calls, schedule events and samples on cpu cycles
continously:
# perf record -g -e cycles -e raw_syscalls:*/call-graph=no/ \
-e sched:sched_switch/call-graph=no/ \
--switch-output --overwrite -a
Then by sending SIGUSR2 to perf when lagging is happen, we get multiple
perf.data output, each of them correspond a abnormal event, and the data
size is reasonable:
# ls -l ./perf.data*
-rw------- 1 root root 5122165 May 13 23:51 ./perf.data.2016051323511683
-rw------- 1 root root 5135093 May 13 23:51 ./perf.data.2016051323512107
-rw------- 1 root root 5135213 May 13 23:51 ./perf.data.2016051323512215
-rw------- 1 root root 5135157 May 13 23:51 ./perf.data.2016051323512387
v1 -> v2: Totally redesign: drop the principle of 'channal', use
auxiliary evlist instead. Fix missing documentation.
v2 -> v3: Rename perf_evlist__toggle_paused() to perf_evlist__pause/resume.
v3 -> v4: Update commit message to describe auxiliary evlist more clearly.
v4 -> v5: Reorder commits, ensure '--overwrite' works right after perf
support the option.
Add test cases for auxiliary evlist.
Avoid bug if main evlist is empty.
Wang Nan (8):
perf tools: Check 'base' pointer before checking refcnt when put a
mmap
perf tools: Choose correct reading direction according to
evlist->backward
perf tests: Add testcase for auxiliary evlist
perf record: Introduce rec->overwrite_evlist for overwritable events
perf record: Toggle overwrite ring buffer for reading
perf tools: Enable overwrite settings
perf tools: Don't warn about out of order event if write_backward is
used
perf tools: Check write_backward during evlist config
tools/perf/Documentation/perf-record.txt | 14 ++
tools/perf/builtin-record.c | 285 +++++++++++++++++++++++++++----
tools/perf/perf.h | 1 +
tools/perf/tests/backward-ring-buffer.c | 86 +++++++---
tools/perf/util/evlist.c | 15 +-
tools/perf/util/evlist.h | 2 +
tools/perf/util/evsel.c | 27 +--
tools/perf/util/evsel.h | 15 ++
tools/perf/util/parse-events.c | 20 ++-
tools/perf/util/parse-events.h | 2 +
tools/perf/util/parse-events.l | 2 +
tools/perf/util/record.c | 17 ++
tools/perf/util/session.c | 22 ++-
13 files changed, 435 insertions(+), 73 deletions(-)
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
--
1.8.3.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v5 0/8] perf tools: Support overwritable ring buffer Wang Nan <wangnan0@huawei.com> - 2016-05-25 07:10 +0200
[PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events Wang Nan <wangnan0@huawei.com> - 2016-05-25 07:10 +0200
Re: [PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events "Wangnan (F)" <wangnan0@huawei.com> - 2016-05-25 12:20 +0200
Re: [PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events "Wangnan (F)" <wangnan0@huawei.com> - 2016-05-25 15:50 +0200
Re: [PATCH v5 4/8] perf record: Introduce rec->overwrite_evlist for overwritable events Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-25 16:20 +0200
[PATCH v5 1/8] perf tools: Check 'base' pointer before checking refcnt when put a mmap Wang Nan <wangnan0@huawei.com> - 2016-05-25 07:10 +0200
[PATCH v5 2/8] perf tools: Choose correct reading direction according to evlist->backward Wang Nan <wangnan0@huawei.com> - 2016-05-25 07:10 +0200
[PATCH v5 3/8] perf tests: Add testcase for auxiliary evlist Wang Nan <wangnan0@huawei.com> - 2016-05-25 07:10 +0200
[PATCH v5 7/8] perf tools: Don't warn about out of order event if write_backward is used Wang Nan <wangnan0@huawei.com> - 2016-05-25 07:10 +0200
[PATCH v5 6/8] perf tools: Enable overwrite settings Wang Nan <wangnan0@huawei.com> - 2016-05-25 07:10 +0200
csiph-web