[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a3547b9f-e294-ea58-c262-f1a256c3c9d0@arm.com>
Date: Tue, 17 Nov 2020 16:51:12 +0200
From: James Clark <james.clark@....com>
To: Jiri Olsa <jolsa@...hat.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 15/11/2020 23:17, Jiri Olsa wrote:
> 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?
Yes it did turn out with almost no changes by just changing the type.
James
>
> 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