lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 15 Jan 2021 15:53:11 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Song Liu <songliubraving@...com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Mark Rutland <mark.rutland@....com>,
        Jiri Olsa <jolsa@...hat.com>, kernel-team@...com
Subject: Re: [PATCH v7 3/3] perf-stat: enable counting events for BPF programs

Em Tue, Jan 12, 2021 at 04:35:14PM +0900, Namhyung Kim escreveu:
> Hi,
> 
> On Wed, Dec 30, 2020 at 6:42 AM Song Liu <songliubraving@...com> wrote:
> >
> > Introduce perf-stat -b option, which counts events for BPF programs, like:
> >
> > [root@...alhost ~]# ~/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
> >
> > The example above counts cycles and ref-cycles of BPF program of id 254.
> > This is similar to bpftool-prog-profile command, but more flexible.
> >
> > perf-stat -b creates per-cpu perf_event and loads fentry/fexit BPF
> > programs (monitor-progs) to the target BPF program (target-prog). The
> > monitor-progs read perf_event before and after the target-prog, and
> > aggregate the difference in a BPF map. Then the user space reads data
> > from these maps.
> >
> > A new struct bpf_counter is introduced to provide common interface that
> > uses BPF programs/maps to count perf events.
> 
> Acked-by: Namhyung Kim <namhyung@...nel.org>

Applied locally, testing now.

- Arnaldo

Powered by blists - more mailing lists