From 433b31fa00797a2a6205a023e9345f2c5e7896b6 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 26 Sep 2022 14:56:38 -0700 Subject: perf lock contention: Fix a build error on 32-bit It was reported that it failed to build the BPF lock contention skeleton on 32 bit arch due to the size of long. The lost count is used only for reporting errors due to lack of stackmap space through bad_hist which type is 'int'. Let's use int type then. Fixes: 6d499a6b3d90277d ("perf lock: Print the number of lost entries for BPF") Reported-by: Jiri Slaby Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Song Liu Link: http://lore.kernel.org/lkml/20220926215638.3931222-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/lock-contention.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/perf/util/lock-contention.h') diff --git a/tools/perf/util/lock-contention.h b/tools/perf/util/lock-contention.h index 67db311fc9df..b8cb8830b7bc 100644 --- a/tools/perf/util/lock-contention.h +++ b/tools/perf/util/lock-contention.h @@ -114,7 +114,7 @@ struct lock_contention { struct machine *machine; struct hlist_head *result; unsigned long map_nr_entries; - unsigned long lost; + int lost; int max_stack; int stack_skip; }; -- cgit