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]
Date:   Wed, 20 Jan 2021 22:25:53 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     "Jin, Yao" <yao.jin@...ux.intel.com>
Cc:     acme@...nel.org, 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

On Mon, Jan 18, 2021 at 12:54:37PM +0800, Jin, Yao wrote:
> Hi Jiri,
> 
> On 1/12/2021 6:08 PM, Jiri Olsa wrote:
> > On Mon, Jan 04, 2021 at 10:18:37AM +0800, Jin Yao wrote:
> > > The default event list includes the most common events which are widely
> > > used by users. But with -e option, the current perf only counts the events
> > > assigned by -e option. Users may want to collect some extra events with
> > > the default list. For this case, users have to manually add all the events
> > > from the default list. It's inconvenient. Also, users may don't know how to
> > > get the default list.
> > > 
> > > Now it supports a simple syntax: -e +event
> > > 
> > > The prefix '+' tells perf to append this event (or event list) to default
> > > event list.
> > > 
> > > Before:
> > > 
> > > root@...-ppc:~# ./perf stat -e power/energy-pkg/ -a -- sleep 1
> > > 
> > >   Performance counter stats for 'system wide':
> > > 
> > >                2.04 Joules power/energy-pkg/
> > > 
> > >         1.000863884 seconds time elapsed
> > > 
> > > After:
> > > 
> > > root@...-ppc:~# ./perf stat -e +power/energy-pkg/ -a -- sleep 1
> > > 
> > >   Performance counter stats for 'system wide':
> > > 
> > >                2.11 Joules +power/energy-pkg/        #    0.000 K/sec
> > 
> > I dont think we should print the extra '+' prefix
> > 
> > jirka
> > 
> > >            8,007.17 msec   cpu-clock                 #    7.993 CPUs utilized
> > >                 125        context-switches          #    0.016 K/sec
> > >                   8        cpu-migrations            #    0.001 K/sec
> > >                   2        page-faults               #    0.000 K/sec
> > >           8,520,084        cycles                    #    0.001 GHz
> > >           2,808,302        instructions              #    0.33  insn per cycle
> > >             555,427        branches                  #    0.069 M/sec
> > >              59,005        branch-misses             #   10.62% of all branches
> > > 
> > >         1.001832003 seconds time elapsed
> > > 
> > > Signed-off-by: Jin Yao <yao.jin@...ux.intel.com>
> > 
> 
> Printing '+' prefix is the original behavior.
> 
> Without this patch,
> 
> 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

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ