Hi Numfor,
On 7/11/19 2:15 AM, Numfor Mbiziwo-Tiapo wrote:
> -static bool perf_evsel__should_store_id(struct perf_evsel *counter)
> +static bool perf_evsel__should_store_id(struct perf_evsel *counter, int
> run_idx)
> {
> - return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID;
> + return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID
> + && run_idx < 1;
> }
Build fails for me:
builtin-stat.c: In function ‘perf_evsel__should_store_id’:
builtin-stat.c:395:3: error: suggest parentheses around ‘&&’ within ‘||’
[-Werror=parentheses]
return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& run_idx < 1;
^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
And probably,
Fixes: 82bf311e15d2 ("perf stat: Use group read for event groups")