]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Unset perf_event_attr::freq when period term is set
authorJiri Olsa <jolsa@redhat.com>
Sat, 8 Aug 2015 17:12:10 +0000 (19:12 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 10 Aug 2015 14:58:05 +0000 (11:58 -0300)
commitdcb064cc1de59636fdbf11fca64c3ab1db6300c5
treea3468583486c189651932c582f09169bbd0f8a32
parent6825b27fe800b9ad16d63b928416ea3c1972ad27
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