Messages in this thread | | | From | Namhyung Kim <> | Date | Tue, 14 Feb 2023 10:06:36 -0800 | Subject | Re: [PATCH 4/7] perf record: Record dropped sample count |
| |
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
| |