Skip to content

perf record: Allow multiple recording time ranges

Adrian Hunter lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5perf record: Fix way of handling non-perf-event pollfdstools/lib/api/fd/array.h tools/perf/builtin-record.c+83 -21 reply
2/5perf record: Fix done_fd wakeup eventtools/perf/util/evlist.c+2 -11 reply
3/5perf record: Change evlist->ctl_fd to use fdarray_flag__non_perf_eventtools/perf/builtin-record.c tools/perf/util/evlist.c tools/perf/util/evlist.h+3 -321 reply
4/5perf evlist: Add evlist__{en/dis}able_non_dummy()tools/perf/util/evlist.c tools/perf/util/evlist.h+26 -61 reply
5/5perf record: Allow multiple recording time rangestools/perf/Documentation/perf-record.txt tools/perf/builtin-record.c tools/perf/util/evlist.c +1 more+269 -42 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchIan Rogers
1/5A-b
2/5A-b
3/5A-b
4/5A-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] perf record: Allow multiple recording time ranges

Hi

This patch set extends perf record -D/--delay option to accept time ranges for when events are enabled, for instance:

    perf record -e intel_pt// -D 10-20,30-40

to record 10ms to 20ms into the trace and 30ms to 40ms. Refer patch 5 for more details.

This ran into an issue with the handling of polling file descriptors. Essentially, calling perf_evlist__add_pollfd() would not actually result in the file descriptor being polled. Patches 1, 2 and 3 deal with that.

Patch 4 deals with the issue that when disabling events, we actually do not want to disable events collecting sideband information.

Patch 5, the last patch, actually makes the desired enhancement to perf record.

Adrian Hunter (5):
perf record: Fix way of handling non-perf-event pollfds perf record: Fix done_fd wakeup event
perf record: Change evlist->ctl_fd to use fdarray_flag__non_perf_event perf evlist: Add evlist__{en/dis}able_non_dummy()
perf record: Allow multiple recording time ranges

 tools/lib/api/fd/array.h                 |   5 +-
 tools/perf/Documentation/perf-record.txt |   6 +-
 tools/perf/builtin-record.c              | 117 ++++++++++++--
 tools/perf/util/evlist.c                 | 270 +++++++++++++++++++++++++++++--
 tools/perf/util/evlist.h                 |  12 +-
 5 files changed, 374 insertions(+), 36 deletions(-)

Regards
Adrian