From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:perf/core] perf tools: Unset perf_event_attr:: freq when period term is set
Date: Wed, 12 Aug 2015 05:29:54 -0700 [thread overview]
Message-ID: <tip-ab35a7d0ee59a36c9c567defe43c1adb72e9240c@git.kernel.org> (raw)
In-Reply-To: <20150808171210.GC17040@krava.brq.redhat.com>
Commit-ID: ab35a7d0ee59a36c9c567defe43c1adb72e9240c
Gitweb: http://git.kernel.org/tip/ab35a7d0ee59a36c9c567defe43c1adb72e9240c
Author: Jiri Olsa <jolsa@redhat.com>
AuthorDate: Sat, 8 Aug 2015 19:12:10 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
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 <jolsa@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20150808171210.GC17040@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
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)
next prev parent reply other threads:[~2015-08-12 12:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 19:44 [PATCH RFC V9 1/3] perf,tools: move callchain option parse code to util.c kan.liang
2015-08-06 19:44 ` [PATCH RFC V9 2/3] perf,tools: per-event callgraph support kan.liang
2015-08-07 10:54 ` Jiri Olsa
2015-08-07 15:38 ` Arnaldo Carvalho de Melo
2015-08-07 15:49 ` Arnaldo Carvalho de Melo
2015-08-08 16:45 ` Jiri Olsa
2015-08-08 17:35 ` Arnaldo Carvalho de Melo
2015-08-10 13:46 ` Arnaldo Carvalho de Melo
2015-08-10 12:56 ` Liang, Kan
2015-08-10 15:39 ` Arnaldo Carvalho de Melo
2015-08-10 18:57 ` Liang, Kan
2015-08-10 19:39 ` Arnaldo Carvalho de Melo
2015-08-08 17:12 ` [PATCH] perf tools: Unset perf_event_attr::freq when period term is set Jiri Olsa
2015-08-12 12:29 ` tip-bot for Jiri Olsa [this message]
2015-08-06 19:44 ` [PATCH RFC V9 3/3] perf,tests: Add tests to callgraph and time parse kan.liang
2015-08-07 10:54 ` Jiri Olsa
2015-08-07 10:51 ` [PATCH] perf tools: Move perf_counts struct and functions into separate object Jiri Olsa
2015-08-07 13:14 ` Arnaldo Carvalho de Melo
2015-08-12 12:28 ` [tip:perf/core] perf stat: " tip-bot for Jiri Olsa
2015-08-12 12:29 ` [tip:perf/core] perf callchain: Move option parsing code to util.c tip-bot for Kan Liang
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=tip-ab35a7d0ee59a36c9c567defe43c1adb72e9240c@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome