5 #include <subcmd/parse-options.h> 8 #define BRANCH_OPT(n, m) \ 9 { .name = n, .mode = (m) } 11 #define BRANCH_END { .name = NULL } 23 BRANCH_OPT(
"any_call", PERF_SAMPLE_BRANCH_ANY_CALL),
24 BRANCH_OPT(
"any_ret", PERF_SAMPLE_BRANCH_ANY_RETURN),
25 BRANCH_OPT(
"ind_call", PERF_SAMPLE_BRANCH_IND_CALL),
26 BRANCH_OPT(
"abort_tx", PERF_SAMPLE_BRANCH_ABORT_TX),
30 BRANCH_OPT(
"ind_jmp", PERF_SAMPLE_BRANCH_IND_JUMP),
32 BRANCH_OPT(
"save_type", PERF_SAMPLE_BRANCH_TYPE_SAVE),
39 (PERF_SAMPLE_BRANCH_USER |\ 40 PERF_SAMPLE_BRANCH_KERNEL |\ 41 PERF_SAMPLE_BRANCH_HV) 49 *mode = PERF_SAMPLE_BRANCH_ANY;
63 for (br = branch_modes; br->
name; br++) {
64 if (!strcasecmp(s, br->
name))
70 " check man page\n", s);
84 *mode = PERF_SAMPLE_BRANCH_ANY;
94 __u64 *
mode = (__u64 *)opt->value;
static const struct branch_mode branch_modes[]
static int str(yyscan_t scanner, int token)
int parse_branch_str(const char *str, __u64 *mode)
#define pr_warning(fmt,...)
int parse_branch_stack(const struct option *opt, const char *str, int unset)