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: <002d04ce-72a5-4a8f-30c2-ec1bcfd08358@linux.intel.com>
Date:   Thu, 12 Oct 2017 20:13:02 +0800
From:   "Jin, Yao" <yao.jin@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     acme@...nel.org, 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] perf stat: Support metrics with perf stat --per-thread

> 
> I wonder if patch below would be enough for this
> 
> jirka
> 
> 

Hi Jiri,

I think below patch and next patch (in your another mail) is OK, thanks!

Do I need to upgrade my patch to v2 according to your modifications?

Or you will post your patches? Both OK for me. :)

Thanks
Jin Yao

> ---
> diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
> index 35e9848734d6..56a0a36d0653 100644
> --- a/tools/perf/util/stat.c
> +++ b/tools/perf/util/stat.c
> @@ -259,6 +259,7 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel
>   	struct perf_counts_values *aggr = &evsel->counts->aggr;
>   	static struct perf_counts_values zero;
>   	bool skip = false;
> +	u64 val;
>   
>   	if (check_per_pkg(evsel, count, cpu, &skip)) {
>   		pr_err("failed to read per-pkg counter\n");
> @@ -270,6 +271,9 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel
>   
>   	switch (config->aggr_mode) {
>   	case AGGR_THREAD:
> +		val = count->val * evsel->scale;
> +		perf_stat__update_shadow_stats(evsel, &val, 0);
> +		break;
>   	case AGGR_CORE:
>   	case AGGR_SOCKET:
>   	case AGGR_NONE:
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ