linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Kernel Team <Kernel-team@fb.com>,
	Peter Ziljstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	"namhyung@kernel.org" <namhyung@kernel.org>
Subject: Re: [PATCH v1 2/2] perf-stat: enable counting events for BPF programs
Date: Fri, 4 Dec 2020 04:07:44 +0000	[thread overview]
Message-ID: <41603856-ADE3-4765-A578-8AEBAB2301DD@fb.com> (raw)
In-Reply-To: <20201203233141.GE3613628@krava>



> On Dec 3, 2020, at 3:31 PM, Jiri Olsa <jolsa@redhat.com> wrote:
> 
> 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;
> 	      |                                 ^~~

gcc 9 didn't complain about it. Let me fix it in the next version. 

Thanks,
Song


      reply	other threads:[~2020-12-04  4:09 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
2020-12-04  4:07     ` Song Liu [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=41603856-ADE3-4765-A578-8AEBAB2301DD@fb.com \
    --to=songliubraving@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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).