Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1206033
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf tools: Unset perf_event_attr:: freq when period term is set |
| Date | 2015-08-12 14:40 +0200 |
| Message-ID | <pWDu4-4ta-45@gated-at.bofh.it> (permalink) |
| References | <pVfWN-5cg-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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)
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RFC V9 1/3] perf,tools: move callchain option parse code to util.c kan.liang@intel.com - 2015-08-07 05:10 +0200
[PATCH RFC V9 2/3] perf,tools: per-event callgraph support kan.liang@intel.com - 2015-08-07 05:10 +0200
Re: [PATCH RFC V9 2/3] perf,tools: per-event callgraph support Jiri Olsa <jolsa@redhat.com> - 2015-08-07 13:00 +0200
Re: [PATCH RFC V9 2/3] perf,tools: per-event callgraph support Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-07 17:50 +0200
Re: [PATCH RFC V9 2/3] perf,tools: per-event callgraph support Jiri Olsa <jolsa@redhat.com> - 2015-08-08 18:50 +0200
Re: [PATCH RFC V9 2/3] perf,tools: per-event callgraph support Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-08 19:40 +0200
RE: [PATCH RFC V9 2/3] perf,tools: per-event callgraph support "Liang, Kan" <kan.liang@intel.com> - 2015-08-10 15:00 +0200
Re: [PATCH RFC V9 2/3] perf,tools: per-event callgraph support Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-10 17:40 +0200
RE: [PATCH RFC V9 2/3] perf,tools: per-event callgraph support "Liang, Kan" <kan.liang@intel.com> - 2015-08-10 21:00 +0200
Re: [PATCH RFC V9 2/3] perf,tools: per-event callgraph support Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-10 21:40 +0200
Re: [PATCH RFC V9 2/3] perf,tools: per-event callgraph support Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-07 18:00 +0200
[PATCH] perf tools: Unset perf_event_attr::freq when period term is set Jiri Olsa <jolsa@redhat.com> - 2015-08-08 19:20 +0200
[tip:perf/core] perf tools: Unset perf_event_attr:: freq when period term is set tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-08-12 14:40 +0200
[PATCH] perf tools: Move perf_counts struct and functions into separate object Jiri Olsa <jolsa@redhat.com> - 2015-08-07 13:00 +0200
Re: [PATCH] perf tools: Move perf_counts struct and functions into separate object Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-07 15:20 +0200
[tip:perf/core] perf stat: Move perf_counts struct and functions into separate object tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-08-12 14:30 +0200
[tip:perf/core] perf callchain: Move option parsing code to util.c tip-bot for Kan Liang <tipbot@zytor.com> - 2015-08-12 14:30 +0200
csiph-web