lkml.org 
[lkml]   [2022]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 1/1] perf arm64: Implement --topdown with metrics
From
Date
On 05/01/2022 16:58, Andrew Kilroy wrote:
>>
>

Sorry for very slow response..

> The --topdown kernel event colouring is dictated by a large if-else
> statement in stat-shadow.c:perf_stat__print_shadow_stats.
>
> There are branches depending on what is returned by
> perf_stat_evsel__is() for example
>
>     } else if (perf_stat_evsel__is(evsel, TOPDOWN_FETCH_BUBBLES)) {
>         double fe_bound = td_fe_bound(cpu, st, &rsd);
>
>         if (fe_bound > 0.2)
>             color = PERF_COLOR_RED;
>         print_metric(config, ctxp, color, "%8.1f%%", "frontend bound",
>                 fe_bound * 100.);
>     } else if (perf_stat_evsel__is(evsel, TOPDOWN_SLOTS_RETIRED)) {
>
>
>
> Because the patches are enabling metrics (equivalent of the -M
> 'somemetricname' option), the perf_stat__print_shadow_stats function
> always makes calls to generic_metric(), where colours are never picked.
>
> Seeing thresholds like:
>
>   retiring > 0.7
>   fe_bound > 0.2
>   be_bound > 0.2
>   bad_spec > 0.1
>
>
> I'm not sure about adding the colouring really.  Are these thresholds
> x86 specific?

There is info on topdown for vtune here:

https://www.intel.com/content/www/us/en/develop/documentation/vtune-cookbook/top/methodologies/top-down-microarchitecture-analysis-method.html

The threshold info described there seems somewhat consistent with perf
tool topdown thresholds and that is based on general guidelines for
certain compute categories.

Andi did mention "specification" here:
https://lore.kernel.org/lkml/CABPqkBRftsHEAEwgCn3i3=mfk9fjh5r4MycdjHKRka5voTj9JA@mail.gmail.com/

But I don't know it, apart from a paper:
file:///home/john/Downloads/TopDown-Yasin-ISPASS14.pdf

Thanks,
John

\
 
 \ /
  Last update: 2022-01-28 19:03    [W:0.193 / U:6.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site