Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754631AbbHLMaO (ORCPT ); Wed, 12 Aug 2015 08:30:14 -0400 Received: from terminus.zytor.com ([198.137.202.10]:42431 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753932AbbHLMaL (ORCPT ); Wed, 12 Aug 2015 08:30:11 -0400 Date: Wed, 12 Aug 2015 05:29:54 -0700 From: tip-bot for Jiri Olsa Message-ID: Cc: jolsa@kernel.org, acme@redhat.com, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, jolsa@redhat.com, ak@linux.intel.com, kan.liang@intel.com, namhyung@kernel.org, hpa@zytor.com Reply-To: kan.liang@intel.com, namhyung@kernel.org, ak@linux.intel.com, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, jolsa@redhat.com, acme@redhat.com, jolsa@kernel.org, mingo@kernel.org In-Reply-To: <20150808171210.GC17040@krava.brq.redhat.com> References: <20150808171210.GC17040@krava.brq.redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Unset perf_event_attr:: freq when period term is set Git-Commit-ID: ab35a7d0ee59a36c9c567defe43c1adb72e9240c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1708 Lines: 44 Commit-ID: ab35a7d0ee59a36c9c567defe43c1adb72e9240c Gitweb: http://git.kernel.org/tip/ab35a7d0ee59a36c9c567defe43c1adb72e9240c Author: Jiri Olsa AuthorDate: Sat, 8 Aug 2015 19:12:10 +0200 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 10 Aug 2015 11:58:05 -0300 perf tools: Unset perf_event_attr::freq when period term is set We need to unset 'perf_event_attr::freq' bit (default 1) when 'period' term is specified within event definition like: -e 'cpu/cpu-cycles,call-graph=fp,time,period=100000' otherwise it will handle the period value as frequency (and fail if it crossed the maximum allowed frequency value). Signed-off-by: Jiri Olsa Cc: Andi Kleen Cc: Kan Liang Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20150808171210.GC17040@krava.brq.redhat.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evsel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index f572f46..a59710f 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -598,6 +598,7 @@ static void apply_config_terms(struct perf_evsel *evsel) switch (term->type) { case PERF_EVSEL__CONFIG_TERM_PERIOD: attr->sample_period = term->val.period; + attr->freq = 0; break; case PERF_EVSEL__CONFIG_TERM_TIME: if (term->val.time) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/