lkml.org 
[lkml]   [2015]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf stat: fix per-pkg event reporting bug
From
On Thu, Sep 3, 2015 at 3:01 AM, Jiri Olsa <jolsa@redhat.com> wrote:
> On Wed, Sep 02, 2015 at 03:17:51PM +0200, Stephane Eranian wrote:
>
> SNIP
>
>> + /*
>> + * we do not consider an event that has not run as a good
>> + * instance to mark a package as used (skip=1). Otherwise
>> + * we may run into a situation where the first CPU in a package
>> + * is not running anything, yet the second is, and this function
>> + * would mark the package as used after the first CPU and would
>> + * not read the values from the second CPU.
>> + */
>> + if (!(vals->run && vals->ena))
>> + return 0;
>> +
>> s = cpu_map__get_socket(cpus, cpu);
>> if (s < 0)
>> return -1;
>> @@ -235,7 +247,7 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel
>> static struct perf_counts_values zero;
>> bool skip = false;
>>
>> - if (check_per_pkg(evsel, cpu, &skip)) {
>> + if (check_per_pkg(evsel, aggr, cpu, &skip)) {
>
> should we pass 'count' instead o 'aggr' ?
>
the reason I passed counts_values is in case this function needs to be
called from other places which do
not use aggr mode.


\
 
 \ /
  Last update: 2015-09-03 14:01    [W:0.075 / U:0.148 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site