Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756793AbdGCO5t (ORCPT ); Mon, 3 Jul 2017 10:57:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:46240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756667AbdGCO5p (ORCPT ); Mon, 3 Jul 2017 10:57:45 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 416D422BD4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Mon, 3 Jul 2017 11:57:39 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: lkml , Ingo Molnar , Peter Zijlstra , Namhyung Kim , David Ahern , Thomas Richter Subject: Re: [PATCH 01/15] perf tools: Fix -n option Message-ID: <20170703145739.GA16278@kernel.org> References: <20170703145030.12903-1-jolsa@kernel.org> <20170703145030.12903-2-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170703145030.12903-2-jolsa@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1268 Lines: 40 Em Mon, Jul 03, 2017 at 04:50:16PM +0200, Jiri Olsa escreveu: > The kernel fails to add a non sampling event event > with having precise_ip set. > > Make sure the precise_ip is 0 when using -n option > to create non sampling event in record. Ok, but how could that happen? What was the scenario? Which command? Can you provide a command line that causes the problem? I ask this because perhaps we should tell the user that what its being asked on a command line doesn't make sense instead of dropping the precise_ip as in your patch. - Arnaldo > Link: http://lkml.kernel.org/n/tip-l513fzc1houvu7tl1bo5y65y@git.kernel.org > Signed-off-by: Jiri Olsa > --- > tools/perf/util/evsel.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c > index 6f4882f8d61f..915fe3cd6544 100644 > --- a/tools/perf/util/evsel.c > +++ b/tools/perf/util/evsel.c > @@ -890,8 +890,10 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts, > attr->sample_period = 0; > } > > - if (opts->no_samples) > + if (opts->no_samples) { > attr->sample_freq = 0; > + attr->precise_ip = 0; > + } > > if (opts->inherit_stat) > attr->inherit_stat = 1; > -- > 2.9.4