lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7chUfoHgZ=uyVEua8XCi4HigzT6p0i7rsL6rZLU2N9r_ZA@mail.gmail.com>
Date: Tue, 20 Aug 2024 15:50:15 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Ian Rogers <irogers@...gle.com>, Kan Liang <kan.liang@...ux.intel.com>, 
	Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>, 
	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>, 
	LKML <linux-kernel@...r.kernel.org>, linux-perf-users@...r.kernel.org, 
	KP Singh <kpsingh@...nel.org>, Song Liu <song@...nel.org>, bpf@...r.kernel.org
Subject: Re: [PATCH v3 2/3] perf tools: Print lost samples due to BPF filter

On Tue, Aug 20, 2024 at 1:51 PM Arnaldo Carvalho de Melo
<acme@...nel.org> wrote:
>
> On Tue, Aug 20, 2024 at 08:45:03AM -0700, Namhyung Kim wrote:
> > +++ b/tools/perf/builtin-report.c
> > @@ -795,8 +795,13 @@ static int count_lost_samples_event(const struct perf_tool *tool,
> >
> >       evsel = evlist__id2evsel(rep->session->evlist, sample->id);
> >       if (evsel) {
> > -             hists__inc_nr_lost_samples(evsel__hists(evsel),
> > -                                        event->lost_samples.lost);
> > +             struct hists *hists = evsel__hists(evsel);
> > +             u32 count = event->lost_samples.lost;
> > +
> > +             if (event->header.misc & PERF_RECORD_MISC_LOST_SAMPLES_BPF)
> > +                     hists__inc_nr_dropped_samples(hists, count);
>
> So this is inconsistent, we call it sometimes "lost", sometines
> "dropped", I think we should make it consistent and call it "dropped",
> because its not like it was "lost" because we didn't have the required
> resources, memory, ring buffer being full, etc, i.e. the semantic
> associated with PERF_RECORD_LOST.
>
> I.e. LOST is non intentional, not expected, DROPPED is the result of the
> user _asking_ for something to be trown away, to be filtered, its
> expected behaviour, there is value in differentiating one from the
> other.

Yep, that's because it's piggybacking on PERF_RECORD_LOST_SAMPLES.
Do you want me to add a new (user) record format for dropped samples?

Thanks,
Namhyung

>
> > +             else
> > +                     hists__inc_nr_lost_samples(hists, count);
> >       }
> >       return 0;
> >  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ