All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
To: Numfor Mbiziwo-Tiapo <nums@google.com>
Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	alexander.shishkin@linux.intel.com, jolsa@redhat.com,
	namhyung@kernel.org, songliubraving@fb.com, mbd@fb.com,
	linux-kernel@vger.kernel.org, irogers@google.com,
	eranian@google.com
Subject: Re: [PATCH] Fix perf stat repeat segfault
Date: Thu, 11 Jul 2019 10:14:01 +0530	[thread overview]
Message-ID: <9e68ade9-ebf9-eb70-474d-3720bb49d9f9@linux.ibm.com> (raw)
In-Reply-To: <20190710204540.176495-1-nums@google.com>

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")


  reply	other threads:[~2019-07-11  4:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10 20:45 [PATCH] Fix perf stat repeat segfault Numfor Mbiziwo-Tiapo
2019-07-11  4:44 ` Ravi Bangoria [this message]
2019-07-14 20:44 ` Jiri Olsa
2019-07-14 20:55   ` Jiri Olsa
2019-07-14 21:36     ` Stephane Eranian
2019-07-15  7:59       ` Jiri Olsa
2019-07-15  8:14         ` Stephane Eranian
2019-07-15  8:31           ` Jiri Olsa
2019-07-15 14:21             ` [PATCH] perf stat: Fix segfault for event group in repeat mode Jiri Olsa
2019-07-16 18:48               ` Arnaldo Carvalho de Melo
2019-07-23 21:49               ` [tip:perf/urgent] " tip-bot for Jiri Olsa
2019-07-11 17:21 [PATCH] Fix perf stat repeat segfault Numfor Mbiziwo-Tiapo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e68ade9-ebf9-eb70-474d-3720bb49d9f9@linux.ibm.com \
    --to=ravi.bangoria@linux.ibm.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbd@fb.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=nums@google.com \
    --cc=peterz@infradead.org \
    --cc=songliubraving@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.