From: Wang Nan <wangnan0@huawei.com>
To: <acme@kernel.org>
Cc: <pi3orama@163.com>, <linux-kernel@vger.kernel.org>,
Wang Nan <wangnan0@huawei.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
He Kuang <hekuang@huawei.com>, Jiri Olsa <jolsa@kernel.org>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Namhyung Kim <namhyung@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
Zefan Li <lizefan@huawei.com>
Subject: [PATCH v4 0/7] perf tools: Support overwritable ring buffer
Date: Tue, 24 May 2016 02:28:57 +0000 [thread overview]
Message-ID: <1464056944-166978-1-git-send-email-wangnan0@huawei.com> (raw)
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.
Wang Nan (7):
perf evlist: Introduce aux perf evlist
perf tools: Don't poll and mmap overwritable events
perf tools: Enable overwrite settings
perf record: Introduce rec->overwrite_evlist for overwritable events
perf record: Toggle overwrite ring buffer for reading
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/arch/x86/util/tsc.c | 2 +
tools/perf/builtin-record.c | 283 +++++++++++++++++++++++++++----
tools/perf/perf.h | 1 +
tools/perf/util/evlist.c | 52 ++++--
tools/perf/util/evlist.h | 3 +
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, 399 insertions(+), 61 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
next reply other threads:[~2016-05-24 2:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 2:28 Wang Nan [this message]
2016-05-24 2:28 ` [PATCH v4 1/7] perf evlist: Introduce aux perf evlist Wang Nan
2016-05-24 2:28 ` [PATCH v4 2/7] perf tools: Don't poll and mmap overwritable events Wang Nan
2016-06-02 6:32 ` [tip:perf/core] perf record: Robustify perf_event__synth_time_conv() tip-bot for Wang Nan
2016-06-02 6:32 ` [tip:perf/core] perf evlist: Don't poll and mmap overwritable events tip-bot for Wang Nan
2016-05-24 2:29 ` [PATCH v4 3/7] perf tools: Enable overwrite settings Wang Nan
2016-05-24 18:40 ` Arnaldo Carvalho de Melo
2016-05-24 18:41 ` Arnaldo Carvalho de Melo
2016-05-25 2:14 ` Wangnan (F)
2016-05-24 2:29 ` [PATCH v4 4/7] perf record: Introduce rec->overwrite_evlist for overwritable events Wang Nan
2016-05-24 2:29 ` [PATCH v4 5/7] perf record: Toggle overwrite ring buffer for reading Wang Nan
2016-05-24 2:29 ` [PATCH v4 6/7] perf tools: Don't warn about out of order event if write_backward is used Wang Nan
2016-05-24 2:29 ` [PATCH v4 7/7] perf tools: Check write_backward during evlist config Wang Nan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464056944-166978-1-git-send-email-wangnan0@huawei.com \
--to=wangnan0@huawei.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=hekuang@huawei.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=pi3orama@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).