From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-perf-users@vger.kernel.org,
Song Liu <songliubraving@fb.com>,
Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCH] perf lock contention: Fix a build error on 32-bit
Date: Wed, 28 Sep 2022 11:18:23 -0300 [thread overview]
Message-ID: <YzRXrzrta0BrcDQ6@kernel.org> (raw)
In-Reply-To: <20220926215638.3931222-1-namhyung@kernel.org>
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
prev parent reply other threads:[~2022-09-28 14:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YzRXrzrta0BrcDQ6@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=jirislaby@kernel.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=songliubraving@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).