All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 00/10] perf tools: Support overwritable ring buffer
@ 2016-05-25 13:44 Wang Nan
  2016-05-25 13:44 ` [PATCH v6 01/10] perf tools: Check 'base' pointer before checking refcnt when put a mmap Wang Nan
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Wang Nan @ 2016-05-25 13:44 UTC (permalink / raw)
  To: acme; +Cc: pi3orama, linux-kernel, Wang Nan

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.

Wang Nan (10):
  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: Pass arg to fdarray__filter's call back function
  perf record: Unmap overwrite evlist when event terminate

 tools/lib/api/fd/array.c                 |   5 +-
 tools/lib/api/fd/array.h                 |   3 +-
 tools/perf/Documentation/perf-record.txt |  14 ++
 tools/perf/builtin-record.c              | 301 +++++++++++++++++++++++++++----
 tools/perf/perf.h                        |   1 +
 tools/perf/tests/backward-ring-buffer.c  |  86 +++++++--
 tools/perf/tests/fdarray.c               |   8 +-
 tools/perf/util/evlist.c                 |  23 ++-
 tools/perf/util/evlist.h                 |   4 +-
 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 ++-
 16 files changed, 465 insertions(+), 85 deletions(-)

-- 
1.8.3.4

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

end of thread, other threads:[~2016-06-02  6:34 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25 13:44 [PATCH v6 00/10] perf tools: Support overwritable ring buffer Wang Nan
2016-05-25 13:44 ` [PATCH v6 01/10] perf tools: Check 'base' pointer before checking refcnt when put a mmap Wang Nan
2016-06-02  6:32   ` [tip:perf/core] perf evlist: " tip-bot for Wang Nan
2016-05-25 13:44 ` [PATCH v6 02/10] perf tools: Choose correct reading direction according to evlist->backward Wang Nan
2016-06-02  6:33   ` [tip:perf/core] perf evlist: " tip-bot for Wang Nan
2016-05-25 13:44 ` [PATCH v6 03/10] perf tests: Add testcase for auxiliary evlist Wang Nan
2016-05-25 13:44 ` [PATCH v6 04/10] perf record: Introduce rec->overwrite_evlist for overwritable events Wang Nan
2016-05-25 13:44 ` [PATCH v6 05/10] perf record: Toggle overwrite ring buffer for reading Wang Nan
2016-05-25 13:44 ` [PATCH v6 06/10] perf tools: Enable overwrite settings Wang Nan
2016-05-25 13:44 ` [PATCH v6 07/10] perf tools: Don't warn about out of order event if write_backward is used Wang Nan
2016-05-25 13:44 ` [PATCH v6 08/10] perf tools: Check write_backward during evlist config Wang Nan
2016-05-25 13:44 ` [PATCH v6 09/10] tools: Pass arg to fdarray__filter's call back function Wang Nan
2016-06-02  6:33   ` [tip:perf/core] " tip-bot for Wang Nan
2016-05-25 13:44 ` [PATCH v6 10/10] perf record: Unmap overwrite evlist when event terminate 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.