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: 6d499a6b3d ("perf lock: Print the number of lost entries for BPF")
Reported-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Link: http://lore.kernel.org/lkml/20220926215638.3931222-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Namhyung Kim 2022-09-26 14:56:38 -07:00 committed by Arnaldo Carvalho de Melo
parent c7c43e38b2
commit 433b31fa00
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ int has_task;
int stack_skip;
/* error stat */
unsigned long lost;
int lost;
static inline int can_record(void)
{

View File

@ -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;
};