]> git.baikalelectronics.ru Git - kernel.git/commit
perf/core: Add a new read format to get a number of lost samples
authorNamhyung Kim <namhyung@kernel.org>
Thu, 16 Jun 2022 18:06:23 +0000 (11:06 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 28 Jun 2022 07:08:31 +0000 (09:08 +0200)
commit92629aac70aae81fa08f8814a4fcdd60480c2bb7
tree6fa3da6264de67a39be33724c2785c045d6d0bfb
parent69b5482bd87ca5bcece472689ef2f2e0f77cf4ec
perf/core: Add a new read format to get a number of lost samples

Sometimes we want to know an accurate number of samples even if it's
lost.  Currenlty PERF_RECORD_LOST is generated for a ring-buffer which
might be shared with other events.  So it's hard to know per-event
lost count.

Add event->lost_samples field and PERF_FORMAT_LOST to retrieve it from
userspace.

Original-patch-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220616180623.1358843-1-namhyung@kernel.org
include/linux/perf_event.h
include/uapi/linux/perf_event.h
kernel/events/core.c
kernel/events/ring_buffer.c