linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>, Jiri Olsa <jolsa@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org,
	Adrian Hunter <adrian.hunter@intel.com>
Subject: [PATCHSET 0/5] perf tools: Show per-event lost sample count (v1)
Date: Wed, 31 Aug 2022 14:03:47 -0700	[thread overview]
Message-ID: <20220831210352.145753-1-namhyung@kernel.org> (raw)

Hello,

Now we have PERF_FORMAT_LOST support, add it to perf record and report so that
it can show number of lost samples per event.  This can be useful if you want
to reconstruct number of events from the samples like when using -c option.

Currently it adds PERF_RECORD_LOST_SAMPLES at the end of perf data after reading
event values by read(2).  The perf record unconditionally sets the lost bit if
the kernel supports it.  Users can see the number with `perf report --stat`.

You can get the code from 'perf/report-lost-v1' brach on

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Thanks,
Namhyung


Namhyung Kim (5):
  perf tools: Print LOST read format in the verbose mode
  perf record: Set PERF_FORMAT_LOST by default
  perf record: Read and inject LOST_SAMPLES events
  perf hist: Add nr_lost_samples to hist_stats
  perf report: Show per-event LOST SAMPLES stat

 tools/perf/builtin-record.c               | 60 +++++++++++++++++++++++
 tools/perf/builtin-report.c               | 17 +++++++
 tools/perf/util/events_stats.h            |  1 +
 tools/perf/util/evsel.c                   | 10 +++-
 tools/perf/util/evsel.h                   |  1 +
 tools/perf/util/hist.c                    |  8 +++
 tools/perf/util/hist.h                    |  1 +
 tools/perf/util/perf_event_attr_fprintf.c |  2 +-
 8 files changed, 98 insertions(+), 2 deletions(-)


base-commit: 2f4c2fbd2ff5e3176b0121443f995808ee498bd0
-- 
2.37.2.789.g6183377224-goog


             reply	other threads:[~2022-08-31 21:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 21:03 Namhyung Kim [this message]
2022-08-31 21:03 ` [PATCH 1/5] perf tools: Print LOST read format in the verbose mode Namhyung Kim
2022-08-31 21:03 ` [PATCH 2/5] perf record: Set PERF_FORMAT_LOST by default Namhyung Kim
2022-08-31 21:03 ` [PATCH 3/5] perf record: Read and inject LOST_SAMPLES events Namhyung Kim
2022-09-01 11:22   ` Adrian Hunter
2022-09-01 18:49     ` Namhyung Kim
2022-08-31 21:03 ` [PATCH 4/5] perf hist: Add nr_lost_samples to hist_stats Namhyung Kim
2022-08-31 21:03 ` [PATCH 5/5] perf report: Show per-event LOST SAMPLES stat Namhyung Kim

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=20220831210352.145753-1-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).