public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>, Andi Kleen <ak@linux.intel.com>,
	Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/5] perf record: Allow multiple recording time ranges
Date: Wed, 24 Aug 2022 10:28:09 +0300	[thread overview]
Message-ID: <20220824072814.16422-1-adrian.hunter@intel.com> (raw)

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

             reply	other threads:[~2022-08-24  7:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24  7:28 Adrian Hunter [this message]
2022-08-24  7:28 ` [PATCH 1/5] perf record: Fix way of handling non-perf-event pollfds Adrian Hunter
2022-08-24 15:40   ` Ian Rogers
2022-08-24  7:28 ` [PATCH 2/5] perf record: Fix done_fd wakeup event Adrian Hunter
2022-08-24 15:41   ` Ian Rogers
2022-08-24  7:28 ` [PATCH 3/5] perf record: Change evlist->ctl_fd to use fdarray_flag__non_perf_event Adrian Hunter
2022-08-24 15:42   ` Ian Rogers
2022-08-24  7:28 ` [PATCH 4/5] perf evlist: Add evlist__{en/dis}able_non_dummy() Adrian Hunter
2022-08-24 15:45   ` Ian Rogers
2022-08-24  7:28 ` [PATCH 5/5] perf record: Allow multiple recording time ranges Adrian Hunter
2022-08-24 15:52   ` Ian Rogers
2022-08-26  6:38     ` Adrian Hunter
2022-08-24 16:56 ` [PATCH 0/5] " Andi Kleen

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=20220824072814.16422-1-adrian.hunter@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexey.v.bayduraev@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /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