Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1431899
| From | Wang Nan <wangnan0@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v11 00/10] perf tools: Support overwritable ring buffer |
| Date | 2016-06-27 12:30 +0200 |
| Message-ID | <rOBXI-7pb-13@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.
v5 -> v6: Improve filter pollfd related code.
v6 -> v7: Rebase to newest perf/core.
v7 -> v8: Unmap mmaps from parent and children in
perf_evlist__munmap_filtered(), hide more detail of aux evlist.
Add --tail-synthesize, do synthesize at the end of perf.data.
v8 -> v9: Beautify code of test case, make patch set more granular,
improve documentation.
v9 -> v10: Make patch set more granular: extract preparation code to
patch 1-3.
v10 -> v11: Rebase to newest perf/core: solve conflicts caused by commit
e5cadb93d08 ("perf evlist: Rename for_each() macros to
for_each_entry()").
Wang Nan (10):
perf record: Prepare mmap multiple evlists
perf record: Prepare reading from multiple evlists in
record__mmap_read_all()
perf record: Prepare picking perf_event_mmap_page from multiple
evlists
perf evlist: Introduce aux evlist
perf tests: Add testcase for auxiliary evlist
perf record: Introduce rec->overwrite_evlist for overwritable events
perf record: Read from overwritable ring buffer
perf tools: Enable overwrite settings
perf tools: Don't warn about out of order event if write_backward is
used
perf tools: Add --tail-synthesize option
tools/perf/Documentation/perf-record.txt | 22 +++
tools/perf/builtin-record.c | 325 +++++++++++++++++++++++++++----
tools/perf/perf.h | 2 +
tools/perf/tests/backward-ring-buffer.c | 96 +++++++--
tools/perf/util/evlist.c | 49 +++--
tools/perf/util/evlist.h | 20 ++
tools/perf/util/evsel.c | 12 ++
tools/perf/util/evsel.h | 2 +
tools/perf/util/parse-events.c | 20 +-
tools/perf/util/parse-events.h | 2 +
tools/perf/util/parse-events.l | 2 +
tools/perf/util/session.c | 22 ++-
12 files changed, 502 insertions(+), 72 deletions(-)
--
1.8.3.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v11 00/10] perf tools: Support overwritable ring buffer Wang Nan <wangnan0@huawei.com> - 2016-06-27 12:30 +0200
[PATCH v11 05/10] perf tests: Add testcase for auxiliary evlist Wang Nan <wangnan0@huawei.com> - 2016-06-27 12:30 +0200
[PATCH v11 06/10] perf record: Introduce rec->overwrite_evlist for overwritable events Wang Nan <wangnan0@huawei.com> - 2016-06-27 12:30 +0200
[PATCH v11 08/10] perf tools: Enable overwrite settings Wang Nan <wangnan0@huawei.com> - 2016-06-27 12:30 +0200
[PATCH v11 09/10] perf tools: Don't warn about out of order event if write_backward is used Wang Nan <wangnan0@huawei.com> - 2016-06-27 12:30 +0200
[PATCH v11 04/10] perf evlist: Introduce aux evlist Wang Nan <wangnan0@huawei.com> - 2016-06-27 12:30 +0200
[PATCH v11 01/10] perf record: Prepare mmap multiple evlists Wang Nan <wangnan0@huawei.com> - 2016-06-27 12:30 +0200
Re: [PATCH v11 01/10] perf record: Prepare mmap multiple evlists Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-06-27 19:50 +0200
[tip:perf/core] perf record: Move mmap setup block to separate function tip-bot for Wang Nan <tipbot@zytor.com> - 2016-06-29 11:50 +0200
[PATCH v11 03/10] perf record: Prepare picking perf_event_mmap_page from multiple evlists Wang Nan <wangnan0@huawei.com> - 2016-06-27 12:30 +0200
[tip:perf/core] perf record: Prepare picking perf_event_mmap_page from multiple evlists tip-bot for Wang Nan <tipbot@zytor.com> - 2016-06-29 11:50 +0200
csiph-web