Linux Perf
parse-branch-options.c File Reference
#include "perf.h"
#include "util/util.h"
#include "util/debug.h"
#include <subcmd/parse-options.h>
#include "util/parse-branch-options.h"
Include dependency graph for parse-branch-options.c:

Go to the source code of this file.

Classes

struct  branch_mode
 

Macros

#define BRANCH_OPT(n, m)   { .name = n, .mode = (m) }
 
#define BRANCH_END   { .name = NULL }
 
#define ONLY_PLM
 

Functions

int parse_branch_str (const char *str, __u64 *mode)
 
int parse_branch_stack (const struct option *opt, const char *str, int unset)
 

Variables

static const struct branch_mode branch_modes []
 

Macro Definition Documentation

◆ BRANCH_END

#define BRANCH_END   { .name = NULL }

Definition at line 11 of file parse-branch-options.c.

◆ BRANCH_OPT

#define BRANCH_OPT (   n,
 
)    { .name = n, .mode = (m) }

Definition at line 8 of file parse-branch-options.c.

◆ ONLY_PLM

#define ONLY_PLM
Value:
(PERF_SAMPLE_BRANCH_USER |\
PERF_SAMPLE_BRANCH_KERNEL |\
PERF_SAMPLE_BRANCH_HV)

Function Documentation

◆ parse_branch_stack()

int parse_branch_stack ( const struct option *  opt,
const char *  str,
int  unset 
)

Definition at line 92 of file parse-branch-options.c.

Here is the call graph for this function:

◆ parse_branch_str()

int parse_branch_str ( const char *  str,
__u64 *  mode 
)

Definition at line 36 of file parse-branch-options.c.

Here is the call graph for this function:

Variable Documentation

◆ branch_modes

const struct branch_mode branch_modes[]
static
Initial value:
= {
BRANCH_OPT("u", PERF_SAMPLE_BRANCH_USER),
BRANCH_OPT("k", PERF_SAMPLE_BRANCH_KERNEL),
BRANCH_OPT("hv", PERF_SAMPLE_BRANCH_HV),
BRANCH_OPT("any", PERF_SAMPLE_BRANCH_ANY),
BRANCH_OPT("any_call", PERF_SAMPLE_BRANCH_ANY_CALL),
BRANCH_OPT("any_ret", PERF_SAMPLE_BRANCH_ANY_RETURN),
BRANCH_OPT("ind_call", PERF_SAMPLE_BRANCH_IND_CALL),
BRANCH_OPT("abort_tx", PERF_SAMPLE_BRANCH_ABORT_TX),
BRANCH_OPT("in_tx", PERF_SAMPLE_BRANCH_IN_TX),
BRANCH_OPT("no_tx", PERF_SAMPLE_BRANCH_NO_TX),
BRANCH_OPT("cond", PERF_SAMPLE_BRANCH_COND),
BRANCH_OPT("ind_jmp", PERF_SAMPLE_BRANCH_IND_JUMP),
BRANCH_OPT("call", PERF_SAMPLE_BRANCH_CALL),
BRANCH_OPT("save_type", PERF_SAMPLE_BRANCH_TYPE_SAVE),
}
#define BRANCH_OPT(n, m)
#define BRANCH_END

Definition at line 18 of file parse-branch-options.c.