public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] perf tools: Support overwritable ring buffer
@ 2016-05-20 16:38 Wang Nan
  2016-05-20 16:38 ` [PATCH v2 01/13] perf tools: Add overwrite attribute to evsel and check write_backward Wang Nan
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Wang Nan @ 2016-05-20 16:38 UTC (permalink / raw)
  To: acme
  Cc: pi3orama, linux-kernel, Wang Nan, Arnaldo Carvalho de Melo,
	He Kuang, Jiri Olsa, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, Zefan Li

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.

Wang Nan (13):
  perf tools: Add overwrite attribute to evsel and check write_backward
  perf tools: Record fd into perf_mmap
  perf tools: Add API to pause a evlist
  perf record: Prevent reading invalid data in record__mmap_read
  perf record: Rename variable to make code clear
  perf record: Read from backward ring buffer
  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              | 344 +++++++++++++++++++++++++++----
 tools/perf/perf.h                        |   1 +
 tools/perf/util/evlist.c                 |  81 ++++++--
 tools/perf/util/evlist.h                 |   6 +
 tools/perf/util/evsel.c                  |  38 +++-
 tools/perf/util/evsel.h                  |  16 ++
 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, 497 insertions(+), 68 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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-05-24  5:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-20 16:38 [PATCH v2 00/13] perf tools: Support overwritable ring buffer Wang Nan
2016-05-20 16:38 ` [PATCH v2 01/13] perf tools: Add overwrite attribute to evsel and check write_backward Wang Nan
2016-05-24  5:45   ` [tip:perf/urgent] perf evsel: Add overwrite attribute " tip-bot for Wang Nan
2016-05-20 16:38 ` [PATCH v2 02/13] perf tools: Record fd into perf_mmap Wang Nan
2016-05-24  5:46   ` [tip:perf/urgent] perf evsel: " tip-bot for Wang Nan
2016-05-20 16:38 ` [PATCH v2 03/13] perf tools: Add API to pause a evlist Wang Nan
2016-05-20 18:05   ` Arnaldo Carvalho de Melo
2016-05-20 16:38 ` [PATCH v2 04/13] perf record: Prevent reading invalid data in record__mmap_read Wang Nan
2016-05-20 16:38 ` [PATCH v2 05/13] perf record: Rename variable to make code clear Wang Nan
2016-05-20 16:38 ` [PATCH v2 06/13] perf record: Read from backward ring buffer Wang Nan
2016-05-20 16:38 ` [PATCH v2 07/13] perf evlist: Introduce aux perf evlist Wang Nan
2016-05-20 16:38 ` [PATCH v2 08/13] perf tools: Don't poll and mmap overwritable events Wang Nan
2016-05-20 16:38 ` [PATCH v2 09/13] perf tools: Enable overwrite settings Wang Nan
2016-05-20 16:38 ` [PATCH v2 10/13] perf record: Introduce rec->overwrite_evlist for overwritable events Wang Nan
2016-05-20 16:38 ` [PATCH v2 11/13] perf record: Toggle overwrite ring buffer for reading Wang Nan
2016-05-20 16:38 ` [PATCH v2 12/13] perf tools: Don't warn about out of order event if write_backward is used Wang Nan
2016-05-20 16:38 ` [PATCH v2 13/13] perf tools: Check write_backward during evlist config Wang Nan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox