* [PATCH] perf lock contention: Fix a build error on 32-bit
@ 2022-09-26 21:56 Namhyung Kim
2022-09-28 14:18 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Namhyung Kim @ 2022-09-26 21:56 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Jiri Olsa
Cc: Ingo Molnar, Peter Zijlstra, LKML, Ian Rogers, Adrian Hunter,
linux-perf-users, Song Liu, Jiri Slaby
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 <jirislaby@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/bpf_skel/lock_contention.bpf.c | 2 +-
tools/perf/util/lock-contention.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/bpf_skel/lock_contention.bpf.c b/tools/perf/util/bpf_skel/lock_contention.bpf.c
index e107d71f0f1a..1bb8628e7c9f 100644
--- a/tools/perf/util/bpf_skel/lock_contention.bpf.c
+++ b/tools/perf/util/bpf_skel/lock_contention.bpf.c
@@ -75,7 +75,7 @@ int has_task;
int stack_skip;
/* error stat */
-unsigned long lost;
+int lost;
static inline int can_record(void)
{
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;
};
--
2.38.0.rc1.362.ged0d419d3c-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] perf lock contention: Fix a build error on 32-bit
2022-09-26 21:56 [PATCH] perf lock contention: Fix a build error on 32-bit Namhyung Kim
@ 2022-09-28 14:18 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-09-28 14:18 UTC (permalink / raw)
To: Namhyung Kim
Cc: Jiri Olsa, Ingo Molnar, Peter Zijlstra, LKML, Ian Rogers,
Adrian Hunter, linux-perf-users, Song Liu, Jiri Slaby
Em Mon, Sep 26, 2022 at 02:56:38PM -0700, Namhyung Kim escreveu:
> 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.
Thanks, applied.
- Arnaldo
> Reported-by: Jiri Slaby <jirislaby@kernel.org>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/util/bpf_skel/lock_contention.bpf.c | 2 +-
> tools/perf/util/lock-contention.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/bpf_skel/lock_contention.bpf.c b/tools/perf/util/bpf_skel/lock_contention.bpf.c
> index e107d71f0f1a..1bb8628e7c9f 100644
> --- a/tools/perf/util/bpf_skel/lock_contention.bpf.c
> +++ b/tools/perf/util/bpf_skel/lock_contention.bpf.c
> @@ -75,7 +75,7 @@ int has_task;
> int stack_skip;
>
> /* error stat */
> -unsigned long lost;
> +int lost;
>
> static inline int can_record(void)
> {
> 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;
> };
> --
> 2.38.0.rc1.362.ged0d419d3c-goog
--
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-28 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-26 21:56 [PATCH] perf lock contention: Fix a build error on 32-bit Namhyung Kim
2022-09-28 14:18 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).