[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9e68ade9-ebf9-eb70-474d-3720bb49d9f9@linux.ibm.com>
Date: Thu, 11 Jul 2019 10:14:01 +0530
From: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
To: Numfor Mbiziwo-Tiapo <nums@...gle.com>
Cc: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
namhyung@...nel.org, songliubraving@...com, mbd@...com,
linux-kernel@...r.kernel.org, irogers@...gle.com,
eranian@...gle.com
Subject: Re: [PATCH] Fix perf stat repeat segfault
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")
Powered by blists - more mailing lists