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: <20201115211753.GD1081385@krava>
Date:   Sun, 15 Nov 2020 22:17:53 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     James Clark <james.clark@....com>
Cc:     linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Thomas Richter <tmricht@...ux.ibm.com>,
        John Garry <john.garry@...wei.com>
Subject: Re: [PATCH 04/13 v4] perf tools: Replace aggregation ID with a struct

On Fri, Nov 13, 2020 at 07:26:45PM +0200, James Clark wrote:

SNIP

> @@ -754,7 +766,7 @@ static void print_aggr_thread(struct perf_stat_config *config,
>  	FILE *output = config->output;
>  	int nthreads = perf_thread_map__nr(counter->core.threads);
>  	int ncpus = perf_cpu_map__nr(counter->core.cpus);
> -	int thread, sorted_threads, id;
> +	int thread, sorted_threads;
>  	struct perf_aggr_thread_value *buf;
>  
>  	buf = sort_aggr_thread(counter, nthreads, ncpus, &sorted_threads, _target);
> @@ -767,13 +779,12 @@ static void print_aggr_thread(struct perf_stat_config *config,
>  		if (prefix)
>  			fprintf(output, "%s", prefix);
>  
> -		id = buf[thread].id;

would it be less changes in here if you kept id with new type?

jirka

>  		if (config->stats)
> -			printout(config, id, 0, buf[thread].counter, buf[thread].uval,
> +			printout(config, buf[thread].id, 0, buf[thread].counter, buf[thread].uval,
>  				 prefix, buf[thread].run, buf[thread].ena, 1.0,
> -				 &config->stats[id]);
> +				 &config->stats[buf[thread].id.id]);
>  		else
> -			printout(config, id, 0, buf[thread].counter, buf[thread].uval,
> +			printout(config, buf[thread].id, 0, buf[thread].counter, buf[thread].uval,
>  				 prefix, buf[thread].run, buf[thread].ena, 1.0,
>  				 &rt_stat);
>  		fputc('\n', output);

SNIP

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ