linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Andi Kleen <ak@linux.intel.com>,
	Kan Liang <kan.liang@linux.intel.com>, Song Liu <song@kernel.org>,
	Stephane Eranian <eranian@google.com>,
	Ravi Bangoria <ravi.bangoria@amd.com>,
	Leo Yan <leo.yan@linaro.org>, James Clark <james.clark@arm.com>,
	Hao Luo <haoluo@google.com>, LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH 4/7] perf record: Record dropped sample count
Date: Tue, 14 Feb 2023 10:06:36 -0800	[thread overview]
Message-ID: <CAM9d7ch9pLB7ZvNjisASruLqaQTw_DdZDjJQFSir7zntQHNnhw@mail.gmail.com> (raw)
In-Reply-To: <CAP-5=fWV+VCheBocBpXg-jRHr+vkNnKWbH4Rjma9imQRJpis+w@mail.gmail.com>

On Tue, Feb 14, 2023 at 8:41 AM Ian Rogers <irogers@google.com> wrote:
>
> On Mon, Feb 13, 2023 at 9:05 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > When it uses bpf filters, event might drop some samples.  It'd be nice
> > if it can report how many samples it lost.  As LOST_SAMPLES event can
> > carry the similar information, let's use it for bpf filters.
> >
> > To indicate it's from BPF filters, add a new misc flag for that and
> > do not display cpu load warnings.
>
> Can you potentially have lost samples from being too slow to drain the
> ring buffer and dropped samples because of BPF? Is it possible to
> distinguish lost and dropped with this approach?

Yeah, the former is exactly what LOST_SAMPLES event gives you.
It should come from the kernel while BPF filters keep a separate
counter for dropped samples and inject LOST_SAMPLES events
with the new misc flag.  So we can differentiate them using the misc
flag and that's how I suppress the warning for BPF dropped ones.

Thanks,
Namhyung

  reply	other threads:[~2023-02-14 18:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14  5:04 [RFC/PATCHSET 0/7] perf record: Implement BPF sample filter (v1) Namhyung Kim
2023-02-14  5:04 ` [PATCH 1/7] perf bpf filter: Introduce basic BPF filter expression Namhyung Kim
2023-02-14 16:10   ` Ian Rogers
2023-02-14 18:03     ` Namhyung Kim
2023-02-14  5:04 ` [PATCH 2/7] perf bpf filter: Implement event sample filtering Namhyung Kim
2023-02-14  5:04 ` [PATCH 3/7] perf record: Add BPF event filter support Namhyung Kim
2023-02-14  5:04 ` [PATCH 4/7] perf record: Record dropped sample count Namhyung Kim
2023-02-14 16:40   ` Ian Rogers
2023-02-14 18:06     ` Namhyung Kim [this message]
2023-02-16 16:23   ` Jiri Olsa
2023-02-16 16:32     ` Arnaldo Carvalho de Melo
2023-02-16 16:34       ` Jiri Olsa
2023-02-16 18:38         ` Namhyung Kim
2023-02-14  5:04 ` [PATCH 5/7] perf bpf filter: Add 'pid' sample data support Namhyung Kim
2023-02-14  5:04 ` [PATCH 6/7] perf bpf filter: Add more weight " Namhyung Kim
2023-02-14  5:04 ` [PATCH 7/7] perf bpf filter: Add data_src " Namhyung Kim
2023-02-14 16:57 ` [RFC/PATCHSET 0/7] perf record: Implement BPF sample filter (v1) Ian Rogers
2023-02-14 18:01   ` Namhyung Kim
2023-02-21 11:54     ` Jiri Olsa
2023-02-22 19:42       ` Namhyung Kim
2023-02-14 19:16   ` Arnaldo Carvalho de Melo
2023-02-14 22:16     ` 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=CAM9d7ch9pLB7ZvNjisASruLqaQTw_DdZDjJQFSir7zntQHNnhw@mail.gmail.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=eranian@google.com \
    --cc=haoluo@google.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    --cc=song@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;
as well as URLs for NNTP newsgroup(s).