lkml.org 
[lkml]   [2020]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 2/2] perf-stat: enable counting events for BPF programs
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

\
 
 \ /
  Last update: 2020-12-04 00:35    [W:0.063 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site