linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org, Will Deacon <will@kernel.org>,
	Waiman Long <longman@redhat.com>,
	Boqun Feng <boqun.feng@gmail.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Song Liu <songliubraving@fb.com>,
	Blake Jones <blakejones@google.com>
Subject: Re: [PATCH v2 3/3] perf lock: Print the number of lost entries for BPF
Date: Mon, 26 Sep 2022 10:05:29 +0200	[thread overview]
Message-ID: <a87d481e-adb7-b4e3-518b-2c4276d906e7@kernel.org> (raw)
In-Reply-To: <20220802191004.347740-3-namhyung@kernel.org>

Hi,

On 02. 08. 22, 21:10, Namhyung Kim wrote:
> Like the normal perf lock contention output, it'd print the number of
> lost entries for BPF if exists or -v option is passed.  Currently it
> uses BROKEN_CONTENDED stat for the lost count (due to full stack maps).
...
> --- a/tools/perf/util/bpf_skel/lock_contention.bpf.c
> +++ b/tools/perf/util/bpf_skel/lock_contention.bpf.c
...
> @@ -73,6 +73,9 @@ int enabled;
>   int has_cpu;
>   int has_task;
>   
> +/* error stat */
> +unsigned long lost;

I don't know how all this is generated into lock_contention.skel.h. But 
I believe this patch breaks perf build on 32bit:
> [  375s] In file included from util/bpf_lock_contention.c:13:
> [  375s] util/bpf_skel/lock_contention.skel.h: In function 'lock_contention_bpf__assert':
> [  375s] util/bpf_skel/lock_contention.skel.h:537:9: error: static assertion failed: "unexpected size of \'lost\'"
> [  375s]   537 |         _Static_assert(sizeof(s->bss->lost) == 8, "unexpected size of 'lost'");
> [  375s]       |         ^~~~~~~~~~~~~~

Should the above (and below too) be __u64?

> --- a/tools/perf/util/lock-contention.h
> +++ b/tools/perf/util/lock-contention.h
> @@ -113,6 +113,7 @@ struct lock_contention {
>   	struct machine *machine;
>   	struct hlist_head *result;
>   	unsigned long map_nr_entries;
> +	unsigned long lost;

thanks,
-- 
js
suse labs


  reply	other threads:[~2022-09-26  8:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 19:10 [PATCH v2 1/3] perf lock: Introduce struct lock_contention Namhyung Kim
2022-08-02 19:10 ` [PATCH v2 2/3] perf lock: Add --map-nr-entries option Namhyung Kim
2022-08-02 19:10 ` [PATCH v2 3/3] perf lock: Print the number of lost entries for BPF Namhyung Kim
2022-09-26  8:05   ` Jiri Slaby [this message]
2022-09-26 21:42     ` Namhyung Kim
2022-08-02 21:04 ` [PATCH v2 1/3] perf lock: Introduce struct lock_contention Arnaldo Carvalho de Melo
2022-08-02 23:47   ` Namhyung Kim
2022-08-03 15:12     ` Arnaldo Carvalho de Melo

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=a87d481e-adb7-b4e3-518b-2c4276d906e7@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=acme@kernel.org \
    --cc=blakejones@google.com \
    --cc=boqun.feng@gmail.com \
    --cc=dave@stgolabs.net \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=songliubraving@fb.com \
    --cc=will@kernel.org \
    /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).