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] [day] [month] [year] [list]
Message-ID: <bfc6c316-99c5-4115-b8f1-83890d7adf38@linux.intel.com>
Date: Wed, 7 Aug 2024 07:57:38 -0400
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: acme@...nel.org, irogers@...gle.com, peterz@...radead.org,
 mingo@...nel.org, linux-kernel@...r.kernel.org, adrian.hunter@...el.com,
 ak@...ux.intel.com, eranian@...gle.com
Subject: Re: [PATCH 6/9] perf report: Display the branch counter histogram

Hi Namhyung,

On 2024-08-06 7:29 p.m., Namhyung Kim wrote:
>>>>            57.55%            2.5M        0.00%           3             |A   |-   |                 ...
>>>>            25.27%            1.1M        0.00%           2             |AA  |-   |                 ...
>>>>            15.61%          667.2K        0.00%           1             |A   |-   |                 ...
>>>>             0.16%            6.9K        0.81%         575             |A   |-   |                 ...
>>>>             0.16%            6.8K        1.38%         977             |AA  |-   |                 ...
>>>>             0.16%            6.8K        0.04%          28             |AA  |B   |                 ...
>>>>             0.15%            6.6K        1.33%         946             |A   |-   |                 ...
>>>>             0.11%            4.5K        0.06%          46             |AAA+|-   |                 ...
>>>>             0.10%            4.4K        0.88%         624             |A   |-   |                 ...
>>>>             0.09%            3.7K        0.74%         524             |AAA+|B   |                 ...
>>> I think this format assumes short width and might not work
>>> well when it has more events with bigger width.  Maybe
>>> A=<n>, B=<n> ?
>> The purpose of "AAA" is to print a histogram here which can give the end
>> user a straightforward image of the distribution. The A=<n> may not be
>> that obvious.
> I understand your point.  But I think we need to provide an easily
> parse-able format at least for CSV output.

I guess we may use a similar method of perf script in patch 8.

By default, the histogram will be output.
If an user want a number, -v should be used.

$perf report --total-cycles --stdio -v

# Sampled Cycles%  Sampled Cycles  Avg Cycles%  Avg Cycles
   Branch Counter                    >
# ...............  ..............  ...........  ..........
..............................  ..................>
#
            4.61%          116.4K        0.00%          91
        A=3+,B=1                     >
            4.28%          108.0K        0.00%          26
        A=1 ,B=1                     >
            3.42%           86.4K        0.00%          81
        A=3+,B=1                     >
            2.84%           71.6K        0.00%          50
        A=3+,B=-                     >
            2.65%           66.8K        0.00%         178
        A=3+,B=1          [__lock_acq>
            2.26%           57.1K        0.00%          44
        A=2 ,B=-                     >

Without -v,
$perf report --total-cycles --stdio

# Sampled Cycles%  Sampled Cycles  Avg Cycles%  Avg Cycles
   Branch Counter                    >
# ...............  ..............  ...........  ..........
..............................  ..................>
#
            4.61%          116.4K        0.00%          91
      |AAA+|B+  |                    >
            4.28%          108.0K        0.00%          26
      |A   |B   |                    >
            3.42%           86.4K        0.00%          81
      |AAA+|B+  |                    >
            2.84%           71.6K        0.00%          50
      |AAA+|-   |                    >
            2.65%           66.8K        0.00%         178
      |AAA+|B+  |         [__lock_acq>
            2.26%           57.1K        0.00%          44
      |AA  |-   |                    >

What do you think?

Thanks,
Kan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ