linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Song Liu <songliubraving@fb.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
	peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	namhyung@kernel.org
Subject: Re: [PATCH v1 2/2] perf-stat: enable counting events for BPF programs
Date: Fri, 4 Dec 2020 00:31:41 +0100	[thread overview]
Message-ID: <20201203233141.GE3613628@krava> (raw)
In-Reply-To: <20201202093709.3374099-3-songliubraving@fb.com>

On Wed, Dec 02, 2020 at 01:37:09AM -0800, Song Liu wrote:
> Introduce perf-stat -b option, which counts events for BPF programs, like:
> 
> [root@localhost ~]# ~/perf stat -e ref-cycles,cycles -b 254 -I 1000
>      1.487903822            115,200      ref-cycles
>      1.487903822             86,012      cycles
>      2.489147029             80,560      ref-cycles
>      2.489147029             73,784      cycles
>      3.490341825             60,720      ref-cycles
>      3.490341825             37,797      cycles
>      4.491540887             37,120      ref-cycles
>      4.491540887             31,963      cycles

hi,
I'm getting compile fail with gcc 10:

	builtin-stat.c: In function ‘cmd_stat’:
	builtin-stat.c:2429:7: error: declaration of ‘err’ shadows a previous local [-Werror=shadow]
	 2429 |   int err = perf_event__synthesize_kernel_mmap((void *)&perf_stat,
	      |       ^~~
	builtin-stat.c:2104:33: note: shadowed declaration is here
	 2104 |  int status = -EINVAL, run_idx, err;
	      |                                 ^~~

jirka


  reply	other threads:[~2020-12-03 23:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02  9:37 [PATCH v1 0/2] Introduce perf-stat -b for BPF programs Song Liu
2020-12-02  9:37 ` [PATCH v1 1/2] perf: support build BPF skeletons with perf Song Liu
2020-12-03 23:31   ` Jiri Olsa
2020-12-04  4:13     ` Song Liu
2020-12-02  9:37 ` [PATCH v1 2/2] perf-stat: enable counting events for BPF programs Song Liu
2020-12-03 23:31   ` Jiri Olsa [this message]
2020-12-04  4:07     ` Song Liu

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=20201203233141.GE3613628@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --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).