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: <6ba550d1-61bc-e229-2a64-331cfa59c388@arm.com>
Date:   Wed, 5 Jan 2022 16:58:42 +0000
From:   Andrew Kilroy <andrew.kilroy@....com>
To:     John Garry <john.garry@...wei.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
        "acme@...nel.org" <acme@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>
Cc:     Will Deacon <will@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [RFC PATCH 1/1] perf arm64: Implement --topdown with metrics



On 17/12/2021 10:19, John Garry wrote:
> 
> And there is no colouring for results which are above/below standard 
> thresholds (see stat-shadow.c:get_radio_color()).
> 
> My impression is that we're not plugging the results from 
> metricgroup__parse_groups_to_evlist() into the --topdown print 
> functionality properly.
> 

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?


> Thanks,
> John


Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ