Like the normal perf lock contention output, it'd print the number of...
lost entries for BPF if exists or -v option is passed. Currently it
uses BROKEN_CONTENDED stat for the lost count (due to full stack maps).
--- a/tools/perf/util/bpf_skel/lock_contention.bpf.c...
+++ b/tools/perf/util/bpf_skel/lock_contention.bpf.c
@@ -73,6 +73,9 @@ int enabled;
int has_cpu;
int has_task;
+/* error stat */
+unsigned long lost;
[ 375s] In file included from util/bpf_lock_contention.c:13:
[ 375s] util/bpf_skel/lock_contention.skel.h: In function 'lock_contention_bpf__assert':
[ 375s] util/bpf_skel/lock_contention.skel.h:537:9: error: static assertion failed: "unexpected size of \'lost\'"
[ 375s] 537 | _Static_assert(sizeof(s->bss->lost) == 8, "unexpected size of 'lost'");
[ 375s] | ^~~~~~~~~~~~~~
--- a/tools/perf/util/lock-contention.h
+++ b/tools/perf/util/lock-contention.h
@@ -113,6 +113,7 @@ struct lock_contention {
struct machine *machine;
struct hlist_head *result;
unsigned long map_nr_entries;
+ unsigned long lost;