All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/17] perf tools: Support overwritable ring buffer
@ 2016-05-13  7:55 Wang Nan
  2016-05-13  7:55 ` [PATCH 01/17] perf tools: Extract __perf_evlist__mmap_read() Wang Nan
                   ` (16 more replies)
  0 siblings, 17 replies; 28+ messages in thread
From: Wang Nan @ 2016-05-13  7:55 UTC (permalink / raw)
  To: acme
  Cc: arnaldo.melo, linux-kernel, Wang Nan, Arnaldo Carvalho de Melo,
	He Kuang, Jiri Olsa, Masami Hiramatsu, Namhyung Kim,
	Peter Zijlstra, Zefan Li, pi3orama

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

Wang Nan (17):
  perf tools: Extract __perf_evlist__mmap_read()
  perf tools: Add evlist channel helpers
  perf tools: Automatically add new channel according to evlist
  perf tools: Operate multiple channels
  perf record: Prevent reading invalid data in record__mmap_read
  perf tools: Squash overwrite setting into channel
  perf record: Don't read from and poll overwrite channel
  perf record: Don't poll on overwrite channel
  perf tools: Detect avalibility of write_backward
  perf tools: Enable overwrite settings
  perf tools: Set write_backward attribut bit for overwrite events
  perf tools: Record fd into perf_mmap
  perf tools: Add API to pause a channel
  perf record: Rename variable to make code clear
  perf record: Read from backward ring buffer
  perf record: Toggle overwrite ring buffer for reading
  perf tools: Don't warn about out of order event if write_backward is
    used

 tools/perf/builtin-record.c    | 207 +++++++++++++++++++++++--
 tools/perf/perf.h              |   2 +
 tools/perf/util/evlist.c       | 332 ++++++++++++++++++++++++++++++++++++-----
 tools/perf/util/evlist.h       |  67 ++++++++-
 tools/perf/util/evsel.c        |  17 +++
 tools/perf/util/evsel.h        |   3 +
 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       |  11 ++
 tools/perf/util/session.c      |  22 ++-
 11 files changed, 625 insertions(+), 60 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] 28+ messages in thread

end of thread, other threads:[~2016-05-20 15:39 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-13  7:55 [PATCH 00/17] perf tools: Support overwritable ring buffer Wang Nan
2016-05-13  7:55 ` [PATCH 01/17] perf tools: Extract __perf_evlist__mmap_read() Wang Nan
2016-05-13 13:03   ` Arnaldo Carvalho de Melo
2016-05-13  7:55 ` [PATCH 02/17] perf tools: Add evlist channel helpers Wang Nan
2016-05-13 13:05   ` Arnaldo Carvalho de Melo
2016-05-18  3:27     ` Wangnan (F)
2016-05-18 13:23       ` Arnaldo Carvalho de Melo
2016-05-13  7:56 ` [PATCH 03/17] perf tools: Automatically add new channel according to evlist Wang Nan
2016-05-13  7:56 ` [PATCH 04/17] perf tools: Operate multiple channels Wang Nan
2016-05-13  7:56 ` [PATCH 05/17] perf record: Prevent reading invalid data in record__mmap_read Wang Nan
2016-05-13  7:56 ` [PATCH 06/17] perf tools: Squash overwrite setting into channel Wang Nan
2016-05-13  7:56 ` [PATCH 07/17] perf record: Don't read from and poll overwrite channel Wang Nan
2016-05-13  7:56 ` [PATCH 08/17] perf record: Don't poll on " Wang Nan
2016-05-13 13:12   ` Arnaldo Carvalho de Melo
2016-05-16  3:18     ` Wangnan (F)
2016-05-13  7:56 ` [PATCH 09/17] perf tools: Detect avalibility of write_backward Wang Nan
2016-05-13 13:08   ` Arnaldo Carvalho de Melo
2016-05-20 15:31     ` Wangnan (F)
2016-05-20 15:39       ` Arnaldo Carvalho de Melo
2016-05-13  7:56 ` [PATCH 10/17] perf tools: Enable overwrite settings Wang Nan
2016-05-16 13:38   ` Arnaldo Carvalho de Melo
2016-05-13  7:56 ` [PATCH 11/17] perf tools: Set write_backward attribut bit for overwrite events Wang Nan
2016-05-13  7:56 ` [PATCH 12/17] perf tools: Record fd into perf_mmap Wang Nan
2016-05-13  7:56 ` [PATCH 13/17] perf tools: Add API to pause a channel Wang Nan
2016-05-13  7:56 ` [PATCH 14/17] perf record: Rename variable to make code clear Wang Nan
2016-05-13  7:56 ` [PATCH 15/17] perf record: Read from backward ring buffer Wang Nan
2016-05-13  7:56 ` [PATCH 16/17] perf record: Toggle overwrite ring buffer for reading Wang Nan
2016-05-13  7:56 ` [PATCH 17/17] perf tools: Don't warn about out of order event if write_backward is used Wang Nan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.