Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932239AbdGCOul (ORCPT ); Mon, 3 Jul 2017 10:50:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49532 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753473AbdGCOuh (ORCPT ); Mon, 3 Jul 2017 10:50:37 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4812C7F6CF Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=jolsa@kernel.org DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4812C7F6CF From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Ingo Molnar , Peter Zijlstra , Namhyung Kim , David Ahern , Thomas Richter Subject: [PATCH 01/15] perf tools: Fix -n option Date: Mon, 3 Jul 2017 16:50:16 +0200 Message-Id: <20170703145030.12903-2-jolsa@kernel.org> In-Reply-To: <20170703145030.12903-1-jolsa@kernel.org> References: <20170703145030.12903-1-jolsa@kernel.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 03 Jul 2017 14:50:36 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 842 Lines: 30 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. 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