perf lock contention: Fix a build error on 32-bit
Namhyung Kim
maintainerPATCH 1/1 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.
Reported-by Jiri Slaby <[email protected]>
Signed-off-by Namhyung Kim <[email protected]>
--- tools/perf/util/bpf_skel/lock_contention.bpf.c | 2 +- tools/perf/util/lock-contention.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/perf/util/bpf_skel/lock_contention.bpf.c +1 -1
@@ -75,7 +75,7 @@ int has_task;int stack_skip;/* error stat */ -unsigned long lost; +int lost;static inline int can_record (void ) {
tools/perf/util/lock-contention.h +1 -1
@@ -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; };
Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog
Em Mon, Sep 26, 2022 at 02:56:38PM -0700, Namhyung Kim escreveu:
Quoted 4 lines
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_histwhich type is 'int'. Let's use int type then.
Thanks, applied.
- Arnaldo
Quoted 35 lines
Reported-by Jiri Slaby <[email protected]>Signed-off-by Namhyung Kim <[email protected]>--- tools/perf/util/bpf_skel/lock_contention.bpf.c | 2 +- tools/perf/util/lock-contention.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tools/perf/util/bpf_skel/lock_contention.bpf.c +1
-1@@ -75,7 +75,7 @@ int has_task;int stack_skip;/* error stat */ -unsigned long lost; +int lost;static inline int can_record (void ) {tools/perf/util/lock-contention.h +1
-1@@ -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; };Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog
Signature · 1 line
- Arnaldo