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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Jan 2021 21:03:55 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     "Jin, Yao" <yao.jin@...ux.intel.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 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?

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
[root@...co ~]#

Like with:

[root@...co ~]# perf stat -d sleep 1

 Performance counter stats for 'sleep 1':

              0.80 msec task-clock                #    0.001 CPUs utilized
                 1      context-switches          #    0.001 M/sec
                 0      cpu-migrations            #    0.000 K/sec
                59      page-faults               #    0.073 M/sec
         2,215,522      cycles                    #    2.757 GHz                      (7.40%)
         1,073,189      instructions              #    0.48  insn per cycle           (80.59%)
           203,615      branches                  #  253.392 M/sec
             8,309      branch-misses             #    4.08% of all branches
           245,866      L1-dcache-loads           #  305.972 M/sec
            14,024      L1-dcache-load-misses     #    5.70% of all L1-dcache accesses  (92.60%)
     <not counted>      LLC-loads                                                     (0.00%)
     <not counted>      LLC-load-misses                                               (0.00%)

       1.001887261 seconds time elapsed

       0.000000000 seconds user
       0.001413000 seconds sys


Some events weren't counted. Try disabling the NMI watchdog:
	echo 0 > /proc/sys/kernel/nmi_watchdog
	perf stat ...
	echo 1 > /proc/sys/kernel/nmi_watchdog
[root@...co ~]# perf stat -e -LLC* -d sleep 1
event syntax error: '-LLC*'
                     \___ 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
[root@...co ~]#

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ