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: <b2fbbc6e-0d8f-472c-897e-0056b4803e36@amd.com>
Date: Mon, 27 Jan 2025 14:26:48 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: acme@...nel.org, peterz@...radead.org, mingo@...hat.com,
 eranian@...gle.com, irogers@...gle.com, kan.liang@...ux.intel.com,
 jolsa@...nel.org, adrian.hunter@...el.com,
 alexander.shishkin@...ux.intel.com, bp@...en8.de, mark.rutland@....com,
 linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
 santosh.shukla@....com, ananth.narayan@....com, sandipan.das@....com,
 Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [RFC] perf script AMD/IBS: Add scripts to show
 function/instruction level granular profile

Hi Namhyung,

> On Fri, Jan 24, 2025 at 06:06:38AM +0000, Ravi Bangoria wrote:
>> AMD IBS (Instruction Based Sampling) PMUs provides various insights
>> about instruction execution through front-end and back-end units.
>> Various perf tools (e.g. precise-mode (:p), perf-mem, perf-c2c etc.)
>> uses portion of these information but lot of other insightful data are
>> still remains unused by perf. I could not think of any generic perf
>> tool where I can consolidate and show all these data, so thought to
>> add perf-python scripts.
> 
> Thanks for doing this.  I agree that there are many rooms for
> improvement in this regard.  While I'm ok to add the scripts, I'm
> curious if we can add something as sort keys so that it can be used in
> the general perf-mem and perf-c2c.
> 
> For example, function level data source breakdown can be shown:
> 
>   $ perf mem report -H -s sym,mem
>   #
>   #    Overhead       Samples  Symbol / Memory access
>   # .........................  ......................
>   #
>        4.58%            97     [k] psi_group_change
>           2.89%            51     L1 hit                                 
>           1.38%            35     LFB/MAB hit                            
>           0.19%            10     L3 hit                                 
>           0.12%             1     RAM hit
>        4.54%             1     [k] bpf_ksym_find
>           4.54%             1     RAM hit  
> 	  ...

Interesting, I wasn't aware of this mode. I usually group them using -F.

  $ perf mem report -F sample,mem,sym
  Samples: 531K of event 'ibs_op//', Event count (approx.): 4359237
     Samples  Memory access   Symbol
        4922  L1 hit          [k] perf_event_update_userpage
        3028  N/A             [k] perf_event_update_userpage
         281  L2 hit          [k] perf_event_update_userpage
          48  LFB/MAB hit     [k] perf_event_update_userpage

But, AFAIK, -F (or other options) does not allow grouping and showing all
the data at the function granularity. For ex, if I add a TLB column, the
data gets further split hierarchically in -F field order:

  $ perf mem report -F sample,mem,tlb,sym
  Samples: 531K of event 'ibs_op//', Event count (approx.): 4359237
     Samples  Memory access   TLB access    Symbol
        4920  L1 hit          L1 hit        [k] perf_event_update_userpage
        3028  N/A             N/A           [k] perf_event_update_userpage
         280  L2 hit          L1 hit        [k] perf_event_update_userpage
          48  LFB/MAB hit     L1 hit        [k] perf_event_update_userpage
           2  L1 hit          L2 hit        [k] perf_event_update_userpage
           1  L2 hit          L2 hit        [k] perf_event_update_userpage

Thanks for the feedback,
Ravi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ