]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Implement branch_type event parameter
authorAndi Kleen <ak@linux.intel.com>
Wed, 12 Oct 2016 21:02:06 +0000 (14:02 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 24 Oct 2016 14:07:35 +0000 (11:07 -0300)
commitbcc7619d0dcbfbebdb471ecfe98d5fd590ef0bc9
treee3a8ca10680e74baf7e16804b9ce50fff4e030f2
parent829ded63b7698fbe39f0844e7c359f74a8a46d49
perf tools: Implement branch_type event parameter

It can be useful to specify branch type state per event, for example if
we want to collect both software trace points and last branch PMU events
in a single collection. Currently this doesn't work because the software
trace point errors out with -b.

There was already a branch-type parameter to configure branch sample
types per event in the parser, but it was stubbed out. This patch
implements the necessary plumbing to actually enable it.

Now:

  $ perf record -e sched:sched_switch,cpu/cpu-cycles,branch_type=any/ ...

works.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1476306127-19721-1-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/parse-branch-options.c
tools/perf/util/parse-branch-options.h
tools/perf/util/parse-events.c