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  linux-cve-announce  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]
Message-ID: <20210121130225.GV12699@kernel.org>
Date:   Thu, 21 Jan 2021 10:02:25 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     "Jin, Yao" <yao.jin@...ux.intel.com>
Cc:     Jiri Olsa <jolsa@...hat.com>, jolsa@...nel.org,
        peterz@...radead.org, mingo@...hat.com,
        alexander.shishkin@...ux.intel.com, Linux-kernel@...r.kernel.org,
        ak@...ux.intel.com, kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v2] perf stat: Append to default list if use -e +event

Em Thu, Jan 21, 2021 at 02:08:52PM +0800, Jin, Yao escreveu:
> Hi Arnaldo,
> 
> On 1/21/2021 8:03 AM, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Jan 20, 2021 at 10:25:53PM +0100, Jiri Olsa escreveu:
> > > On Mon, Jan 18, 2021 at 12:54:37PM +0800, Jin, Yao wrote:
> > > > root@...-ppc:# ./perf stat -e +power/energy-pkg/ -a -- sleep 1
> > 
> > > >   Performance counter stats for 'system wide':
> > 
> > > >                2.02 Joules +power/energy-pkg/
> > 
> > > >         1.000859434 seconds time elapsed
> > 
> > > > The '+' prefix is printed. So I finally decide not to remove the '+' prefix
> > > > in order to keep original behavior.
> > > hm, originaly there's no purpose for the '+', right?
> > > it seems it's more like bug then anything else
> > > you added function to the '+' to add default events to specified event,
> > > which I think is good idea, but I don't think we should display the
> > > extra '+' in output
> > 
> > The value would be to stress that that is an event added to the ones
> > without the + prefix, i.e. the default ones.
> > 
> > But by having the command line copied over and the added events at the
> > first lines we should have that abundantly clear.
> > 
> > Also we won't print removed events (using -), is that available already?
> > 
> 
> Sorry, the '-' support is not available in this patch. Can I do the patch
> for '+' first and then do a follow up patch for '-' at next step?

Yeah, it can be done afterwards, to be symmetric.
 
> > Nope:
> > 
> > [root@...co ~]# perf stat -e -cycles sleep
> > event syntax error: '-cycles'
> >                       \___ parser error
> > Run 'perf list' for a list of valid events
> > 
> >   Usage: perf stat [<options>] [<command>]
> > 
> >      -e, --event <event>   event selector. use 'perf list' to list available events
 
> So if we just want to append the default list, we only need to set
> detailed_run=1, then ideally perf-stat will print the default list.
 
> But for now, there are no task-clock, context-switches, cpu-migrations,
> page-faults, instructions, branches and branch-misses displayed.
 
> root@...-ppc:~# ./perf stat -e cycles -d -a -- sleep 1
> 
>  Performance counter stats for 'system wide':
> 
>        124,178,207      cycles                                                        (80.02%)
>          6,444,490      L1-dcache-loads                                               (80.01%)
>          1,043,169      L1-dcache-load-misses     #   16.19% of all L1-dcache accesses  (80.02%)
>            564,474      LLC-loads                                                     (80.02%)
>             49,262      LLC-load-misses           #    8.73% of all LL-cache accesses  (79.92%)
> 
>        1.001614947 seconds time elapsed
> 
> Do we still need the '+' prefix to add the specified event on top of default
> list? It looks current syntax should already support that feature, but just
> need to fix some issues.

I think we can do away with that '+' when showing the added events and
its counts.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ