diff options
author | 2016-10-12 14:02:06 -0700 | |
---|---|---|
committer | 2016-10-24 11:07:35 -0300 | |
commit | ac12f6764c5097e791cd44f10b8943b40f44bfe7 (patch) | |
tree | e3a8ca10680e74baf7e16804b9ce50fff4e030f2 /tools/perf/util/parse-branch-options.h | |
parent | perf record: Improve documentation of event parameters (diff) | |
download | linux-ac12f6764c5097e791cd44f10b8943b40f44bfe7.tar.gz linux-ac12f6764c5097e791cd44f10b8943b40f44bfe7.tar.bz2 linux-ac12f6764c5097e791cd44f10b8943b40f44bfe7.zip |
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>
Diffstat (limited to 'tools/perf/util/parse-branch-options.h')
-rw-r--r-- | tools/perf/util/parse-branch-options.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/parse-branch-options.h b/tools/perf/util/parse-branch-options.h index b9d9470c2e82..6086fd90eb23 100644 --- a/tools/perf/util/parse-branch-options.h +++ b/tools/perf/util/parse-branch-options.h @@ -1,5 +1,6 @@ #ifndef _PERF_PARSE_BRANCH_OPTIONS_H #define _PERF_PARSE_BRANCH_OPTIONS_H 1 -struct option; +#include <stdint.h> int parse_branch_stack(const struct option *opt, const char *str, int unset); +int parse_branch_str(const char *str, __u64 *mode); #endif /* _PERF_PARSE_BRANCH_OPTIONS_H */ |