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, 22 Jan 2021 09:43:23 +0800
From:   "Jin, Yao" <yao.jin@...ux.intel.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
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

Hi Arnaldo,

On 1/21/2021 9:02 PM, Arnaldo Carvalho de Melo wrote:
>> 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

Can you help to look at my v3 (I will post it soon)? It only has one line change but it can achieve 
the goal. Another advantage is it can append the metrics to the default event list easily.

For example,

root@...-ppc:~# ./perf stat -M Page_Walks_Utilization -d -a -- sleep 1

  Performance counter stats for 'system wide':

          1,417,358      itlb_misses.walk_pending  #    0.177 M/sec
                                                   #     0.05 Page_Walks_Utilization   (30.44%)
          1,145,481      dtlb_store_misses.walk_pending #    0.143 M/sec                    (30.85%)
        126,098,937      cycles                    #    0.016 GHz                      (31.25%)
          9,069,839      dtlb_load_misses.walk_pending #    1.132 M/sec                    (31.64%)
                  0      ept.walk_pending          #    0.000 K/sec                    (31.61%)
           8,009.41 msec cpu-clock                 #    7.994 CPUs utilized
                300      context-switches          #    0.037 K/sec
                  8      cpu-migrations            #    0.001 K/sec
                  3      page-faults               #    0.000 K/sec
        124,456,362      cycles                    #    0.016 GHz                      (31.20%)
         23,924,628      instructions              #    0.19  insn per cycle           (38.79%)
          4,532,511      branches                  #    0.566 M/sec                    (38.39%)
            650,797      branch-misses             #   14.36% of all branches          (38.00%)
          6,332,823      L1-dcache-loads           #    0.791 M/sec                    (37.95%)
          1,056,199      L1-dcache-load-misses     #   16.68% of all L1-dcache accesses  (37.95%)
            572,791      LLC-loads                 #    0.072 M/sec                    (30.36%)
             52,025      LLC-load-misses           #    9.08% of all LL-cache accesses  (30.36%)

        1.001966758 seconds time elapsed

It appends the metric 'Page_Walks_Utilization' to the default event list.

Anyway, if you think it's not a good solution, I'd like to change it. :)

Thanks
Jin Yao

Powered by blists - more mailing lists