Linux Perf
parse-events.c File Reference
#include <linux/hw_breakpoint.h>
#include <linux/err.h>
#include <dirent.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/param.h>
#include "term.h"
#include "../perf.h"
#include "evlist.h"
#include "evsel.h"
#include <subcmd/parse-options.h>
#include "parse-events.h"
#include <subcmd/exec-cmd.h>
#include "string2.h"
#include "strlist.h"
#include "symbol.h"
#include "cache.h"
#include "header.h"
#include "bpf-loader.h"
#include "debug.h"
#include <api/fs/tracing_path.h>
#include "parse-events-bison.h"
#include "parse-events-flex.h"
#include "pmu.h"
#include "thread_map.h"
#include "cpumap.h"
#include "probe-file.h"
#include "asm/bug.h"
#include "util/parse-branch-options.h"
#include "metricgroup.h"
Include dependency graph for parse-events.c:

Go to the source code of this file.

Classes

struct  __add_bpf_event_param
 
struct  event_modifier
 

Macros

#define YY_EXTRA_TYPE   int
 
#define MAX_NAME_LEN   100
 
#define __PERF_EVENT_FIELD(config, name)   ((config & PERF_EVENT_##name##_MASK) >> PERF_EVENT_##name##_SHIFT)
 
#define PERF_EVENT_RAW(config)   __PERF_EVENT_FIELD(config, RAW)
 
#define PERF_EVENT_CONFIG(config)   __PERF_EVENT_FIELD(config, CONFIG)
 
#define PERF_EVENT_TYPE(config)   __PERF_EVENT_FIELD(config, TYPE)
 
#define PERF_EVENT_ID(config)   __PERF_EVENT_FIELD(config, EVENT)
 
#define for_each_subsystem(sys_dir, sys_dirent)
 
#define for_each_event(dir_path, evt_dir, evt_dirent)
 
#define MAX_EVENT_LENGTH   512
 
#define CHECK_SET_TYPE(bit)
 
#define CHECK_TYPE_VAL(type)
 
#define ADD_CONFIG_TERM(__type, __name, __val)
 
#define SET_SYMBOL(str, stype)
 
#define MAX_WIDTH   1000
 

Typedefs

typedef int config_term_func_t(struct perf_event_attr *attr, struct parse_events_term *term, struct parse_events_error *err)
 

Functions

int parse_events_parse (void *parse_state, void *scanner)
 
static int get_config_terms (struct list_head *head_config, struct list_head *head_terms __maybe_unused)
 
static int tp_event_has_id (const char *dir_path, struct dirent *evt_dir)
 
struct tracepoint_pathtracepoint_id_to_path (u64 config)
 
struct tracepoint_pathtracepoint_name_to_path (const char *name)
 
const char * event_type (int type)
 
static int parse_events__is_name_term (struct parse_events_term *term)
 
static char * get_config_name (struct list_head *head_terms)
 
static struct perf_evsel__add_event (struct list_head *list, int *idx, struct perf_event_attr *attr, char *name, struct perf_pmu *pmu, struct list_head *config_terms, bool auto_merge_stats)
 
static int add_event (struct list_head *list, int *idx, struct perf_event_attr *attr, char *name, struct list_head *config_terms)
 
static int parse_aliases (char *str, const char *names[][PERF_EVSEL__MAX_ALIASES], int size)
 
static int config_term_common (struct perf_event_attr *attr, struct parse_events_term *term, struct parse_events_error *err)
 
static int config_attr (struct perf_event_attr *attr, struct list_head *head, struct parse_events_error *err, config_term_func_t config_term)
 
int parse_events_add_cache (struct list_head *list, int *idx, char *type, char *op_result1, char *op_result2, struct parse_events_error *err, struct list_head *head_config)
 
static void tracepoint_error (struct parse_events_error *e, int err, const char *sys, const char *name)
 
static int add_tracepoint (struct list_head *list, int *idx, const char *sys_name, const char *evt_name, struct parse_events_error *err, struct list_head *head_config)
 
static int add_tracepoint_multi_event (struct list_head *list, int *idx, const char *sys_name, const char *evt_name, struct parse_events_error *err, struct list_head *head_config)
 
static int add_tracepoint_event (struct list_head *list, int *idx, const char *sys_name, const char *evt_name, struct parse_events_error *err, struct list_head *head_config)
 
static int add_tracepoint_multi_sys (struct list_head *list, int *idx, const char *sys_name, const char *evt_name, struct parse_events_error *err, struct list_head *head_config)
 
static int add_bpf_event (const char *group, const char *event, int fd, void *_param)
 
int parse_events_load_bpf_obj (struct parse_events_state *parse_state, struct list_head *list, struct bpf_object *obj, struct list_head *head_config)
 
static int parse_events_config_bpf (struct parse_events_state *parse_state, struct bpf_object *obj, struct list_head *head_config)
 
static void split_bpf_config_terms (struct list_head *evt_head_config, struct list_head *obj_head_config)
 
int parse_events_load_bpf (struct parse_events_state *parse_state, struct list_head *list, char *bpf_file_name, bool source, struct list_head *head_config)
 
static int parse_breakpoint_type (const char *type, struct perf_event_attr *attr)
 
int parse_events_add_breakpoint (struct list_head *list, int *idx, void *ptr, char *type, u64 len)
 
static int check_type_val (struct parse_events_term *term, struct parse_events_error *err, int type)
 
static bool config_term_avail (int term_type, struct parse_events_error *err)
 
void parse_events__shrink_config_terms (void)
 
static int config_term_pmu (struct perf_event_attr *attr, struct parse_events_term *term, struct parse_events_error *err)
 
static int config_term_tracepoint (struct perf_event_attr *attr, struct parse_events_term *term, struct parse_events_error *err)
 
int parse_events_add_tracepoint (struct list_head *list, int *idx, const char *sys, const char *event, struct parse_events_error *err, struct list_head *head_config)
 
int parse_events_add_numeric (struct parse_events_state *parse_state, struct list_head *list, u32 type, u64 config, struct list_head *head_config)
 
int parse_events_add_pmu (struct parse_events_state *parse_state, struct list_head *list, char *name, struct list_head *head_config, bool auto_merge_stats, bool use_alias)
 
int parse_events_multi_pmu_add (struct parse_events_state *parse_state, char *str, struct list_head **listp)
 
int parse_events__modifier_group (struct list_head *list, char *event_mod)
 
static bool is_same_uncore_block (const char *pmu_name_a, const char *pmu_name_b)
 
static int parse_events__set_leader_for_uncore_aliase (char *name, struct list_head *list, struct parse_events_state *parse_state)
 
void parse_events__set_leader (char *name, struct list_head *list, struct parse_events_state *parse_state)
 
void parse_events_update_lists (struct list_head *list_event, struct list_head *list_all)
 
static int get_event_modifier (struct event_modifier *mod, char *str, struct perf_evsel *evsel)
 
static int check_modifier (char *str)
 
int parse_events__modifier_event (struct list_head *list, char *str, bool add)
 
int parse_events_name (struct list_head *list, char *name)
 
static int comp_pmu (const void *p1, const void *p2)
 
static void perf_pmu__parse_cleanup (void)
 
static void perf_pmu__parse_init (void)
 
enum perf_pmu_event_symbol_type perf_pmu__parse_check (const char *name)
 
static int parse_events__scanner (const char *str, void *parse_state, int start_token)
 
int parse_events_terms (struct list_head *terms, const char *str)
 
int parse_events (struct perf_evlist *evlist, const char *str, struct parse_events_error *err)
 
static int get_term_width (void)
 
void parse_events_print_error (struct parse_events_error *err, const char *event)
 
int parse_events_option (const struct option *opt, const char *str, int unset __maybe_unused)
 
static int foreach_evsel_in_last_glob (struct perf_evlist *evlist, int(*func)(struct perf_evsel *evsel, const void *arg), const void *arg)
 
static int set_filter (struct perf_evsel *evsel, const void *arg)
 
int parse_filter (const struct option *opt, const char *str, int unset __maybe_unused)
 
static int add_exclude_perf_filter (struct perf_evsel *evsel, const void *arg __maybe_unused)
 
int exclude_perf (const struct option *opt, const char *arg __maybe_unused, int unset __maybe_unused)
 
static int cmp_string (const void *a, const void *b)
 
void print_tracepoint_events (const char *subsys_glob, const char *event_glob, bool name_only)
 
int is_valid_tracepoint (const char *event_string)
 
static bool is_event_supported (u8 type, unsigned config)
 
void print_sdt_events (const char *subsys_glob, const char *event_glob, bool name_only)
 
int print_hwcache_events (const char *event_glob, bool name_only)
 
void print_symbol_events (const char *event_glob, unsigned type, struct event_symbol *syms, unsigned max, bool name_only)
 
void print_events (const char *event_glob, bool name_only, bool quiet_flag, bool long_desc, bool details_flag)
 
int parse_events__is_hardcoded_term (struct parse_events_term *term)
 
static int new_term (struct parse_events_term **_term, struct parse_events_term *temp, char *str, u64 num)
 
int parse_events_term__num (struct parse_events_term **term, int type_term, char *config, u64 num, bool no_value, void *loc_term_, void *loc_val_)
 
int parse_events_term__str (struct parse_events_term **term, int type_term, char *config, char *str, void *loc_term_, void *loc_val_)
 
int parse_events_term__sym_hw (struct parse_events_term **term, char *config, unsigned idx)
 
int parse_events_term__clone (struct parse_events_term **new, struct parse_events_term *term)
 
int parse_events_copy_term_list (struct list_head *old, struct list_head **new)
 
void parse_events_terms__purge (struct list_head *terms)
 
void parse_events_terms__delete (struct list_head *terms)
 
void parse_events__clear_array (struct parse_events_array *a)
 
void parse_events_evlist_error (struct parse_events_state *parse_state, int idx, const char *str)
 
static void config_terms_list (char *buf, size_t buf_sz)
 
char * parse_events_formats_error_string (char *additional_terms)
 

Variables

static struct perf_pmu_event_symbolperf_pmu_events_list
 
static int perf_pmu_events_list_num
 
struct event_symbol event_symbols_hw [PERF_COUNT_HW_MAX]
 
struct event_symbol event_symbols_sw [PERF_COUNT_SW_MAX]
 
static const char * config_term_names [__PARSE_EVENTS__TERM_TYPE_NR]
 
static bool config_term_shrinked
 
static const char *const event_type_descriptors []
 

Macro Definition Documentation

◆ __PERF_EVENT_FIELD

#define __PERF_EVENT_FIELD (   config,
  name 
)    ((config & PERF_EVENT_##name##_MASK) >> PERF_EVENT_##name##_SHIFT)

Definition at line 145 of file parse-events.c.

◆ ADD_CONFIG_TERM

#define ADD_CONFIG_TERM (   __type,
  __name,
  __val 
)
Value:
do { \
struct perf_evsel_config_term *__t; \
\
__t = zalloc(sizeof(*__t)); \
if (!__t) \
return -ENOMEM; \
\
INIT_LIST_HEAD(&__t->list); \
__t->type = PERF_EVSEL__CONFIG_TERM_ ## __type; \
__t->val.__name = __val; \
__t->weak = term->weak; \
list_add_tail(&__t->list, head_terms); \
} while (0)
static int term(yyscan_t scanner, int type)
void static void * zalloc(size_t size)
Definition: util.h:20

◆ CHECK_SET_TYPE

#define CHECK_SET_TYPE (   bit)
Value:
do { \
if (attr->bp_type & bit) \
return -EINVAL; \
else \
attr->bp_type |= bit; \
} while (0)
Definition: attr.py:1

◆ CHECK_TYPE_VAL

#define CHECK_TYPE_VAL (   type)
Value:
do { \
if (check_type_val(term, err, PARSE_EVENTS__TERM_TYPE_ ## type)) \
return -EINVAL; \
} while (0)
int int err
Definition: 5sec.c:44
static int term(yyscan_t scanner, int type)
static int check_type_val(struct parse_events_term *term, struct parse_events_error *err, int type)
Definition: parse-events.c:894

◆ for_each_event

#define for_each_event (   dir_path,
  evt_dir,
  evt_dirent 
)
Value:
while ((evt_dirent = readdir(evt_dir)) != NULL) \
if (evt_dirent->d_type == DT_DIR && \
(strcmp(evt_dirent->d_name, ".")) && \
(strcmp(evt_dirent->d_name, "..")) && \
(!tp_event_has_id(dir_path, evt_dirent)))
static int tp_event_has_id(const char *dir_path, struct dirent *evt_dir)
Definition: parse-events.c:159

Definition at line 173 of file parse-events.c.

◆ for_each_subsystem

#define for_each_subsystem (   sys_dir,
  sys_dirent 
)
Value:
while ((sys_dirent = readdir(sys_dir)) != NULL) \
if (sys_dirent->d_type == DT_DIR && \
(strcmp(sys_dirent->d_name, ".")) && \
(strcmp(sys_dirent->d_name, "..")))

Definition at line 153 of file parse-events.c.

◆ MAX_EVENT_LENGTH

#define MAX_EVENT_LENGTH   512

Definition at line 180 of file parse-events.c.

◆ MAX_NAME_LEN

#define MAX_NAME_LEN   100

Definition at line 37 of file parse-events.c.

◆ MAX_WIDTH

#define MAX_WIDTH   1000

Definition at line 1870 of file parse-events.c.

◆ PERF_EVENT_CONFIG

#define PERF_EVENT_CONFIG (   config)    __PERF_EVENT_FIELD(config, CONFIG)

Definition at line 149 of file parse-events.c.

◆ PERF_EVENT_ID

#define PERF_EVENT_ID (   config)    __PERF_EVENT_FIELD(config, EVENT)

Definition at line 151 of file parse-events.c.

◆ PERF_EVENT_RAW

#define PERF_EVENT_RAW (   config)    __PERF_EVENT_FIELD(config, RAW)

Definition at line 148 of file parse-events.c.

◆ PERF_EVENT_TYPE

#define PERF_EVENT_TYPE (   config)    __PERF_EVENT_FIELD(config, TYPE)

Definition at line 150 of file parse-events.c.

◆ SET_SYMBOL

#define SET_SYMBOL (   str,
  stype 
)
Value:
do { \
p->symbol = str; \
if (!p->symbol) \
goto err; \
p->type = stype; \
} while (0)
int int err
Definition: 5sec.c:44
static int str(yyscan_t scanner, int token)

Definition at line 1701 of file parse-events.c.

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   int

Definition at line 27 of file parse-events.c.

Typedef Documentation

◆ config_term_func_t

typedef int config_term_func_t(struct perf_event_attr *attr, struct parse_events_term *term, struct parse_events_error *err)

Definition at line 372 of file parse-events.c.

Function Documentation

◆ __add_event()

static struct perf_evsel* __add_event ( struct list_head *  list,
int *  idx,
struct perf_event_attr *  attr,
char *  name,
struct perf_pmu pmu,
struct list_head *  config_terms,
bool  auto_merge_stats 
)
static

Definition at line 317 of file parse-events.c.

Here is the call graph for this function:

◆ add_bpf_event()

static int add_bpf_event ( const char *  group,
const char *  event,
int  fd,
void *  _param 
)
static

Definition at line 612 of file parse-events.c.

Here is the call graph for this function:

◆ add_event()

static int add_event ( struct list_head *  list,
int *  idx,
struct perf_event_attr *  attr,
char *  name,
struct list_head *  config_terms 
)
static

Definition at line 347 of file parse-events.c.

Here is the call graph for this function:

◆ add_exclude_perf_filter()

static int add_exclude_perf_filter ( struct perf_evsel evsel,
const void *arg  __maybe_unused 
)
static

Definition at line 2044 of file parse-events.c.

Here is the call graph for this function:

◆ add_tracepoint()

static int add_tracepoint ( struct list_head *  list,
int *  idx,
const char *  sys_name,
const char *  evt_name,
struct parse_events_error err,
struct list_head *  head_config 
)
static

Definition at line 487 of file parse-events.c.

Here is the call graph for this function:

◆ add_tracepoint_event()

static int add_tracepoint_event ( struct list_head *  list,
int *  idx,
const char *  sys_name,
const char *  evt_name,
struct parse_events_error err,
struct list_head *  head_config 
)
static

Definition at line 560 of file parse-events.c.

Here is the call graph for this function:

◆ add_tracepoint_multi_event()

static int add_tracepoint_multi_event ( struct list_head *  list,
int *  idx,
const char *  sys_name,
const char *  evt_name,
struct parse_events_error err,
struct list_head *  head_config 
)
static

Definition at line 512 of file parse-events.c.

Here is the call graph for this function:

◆ add_tracepoint_multi_sys()

static int add_tracepoint_multi_sys ( struct list_head *  list,
int *  idx,
const char *  sys_name,
const char *  evt_name,
struct parse_events_error err,
struct list_head *  head_config 
)
static

Definition at line 572 of file parse-events.c.

Here is the call graph for this function:

◆ check_modifier()

static int check_modifier ( char *  str)
static

Definition at line 1611 of file parse-events.c.

Here is the call graph for this function:

◆ check_type_val()

static int check_type_val ( struct parse_events_term term,
struct parse_events_error err,
int  type 
)
static

Definition at line 894 of file parse-events.c.

◆ cmp_string()

static int cmp_string ( const void *  a,
const void *  b 
)
static

Definition at line 2085 of file parse-events.c.

◆ comp_pmu()

static int comp_pmu ( const void *  p1,
const void *  p2 
)
static

Definition at line 1678 of file parse-events.c.

◆ config_attr()

static int config_attr ( struct perf_event_attr *  attr,
struct list_head *  head,
struct parse_events_error err,
config_term_func_t  config_term 
)
static

Definition at line 1102 of file parse-events.c.

Here is the call graph for this function:

◆ config_term_avail()

static bool config_term_avail ( int  term_type,
struct parse_events_error err 
)
static

Definition at line 937 of file parse-events.c.

◆ config_term_common()

static int config_term_common ( struct perf_event_attr *  attr,
struct parse_events_term term,
struct parse_events_error err 
)
static

Definition at line 970 of file parse-events.c.

Here is the call graph for this function:

◆ config_term_pmu()

static int config_term_pmu ( struct perf_event_attr *  attr,
struct parse_events_term term,
struct parse_events_error err 
)
static

Definition at line 1062 of file parse-events.c.

Here is the call graph for this function:

◆ config_term_tracepoint()

static int config_term_tracepoint ( struct perf_event_attr *  attr,
struct parse_events_term term,
struct parse_events_error err 
)
static

Definition at line 1077 of file parse-events.c.

Here is the call graph for this function:

◆ config_terms_list()

static void config_terms_list ( char *  buf,
size_t  buf_sz 
)
static

Definition at line 2703 of file parse-events.c.

Here is the call graph for this function:

◆ event_type()

const char* event_type ( int  type)

Definition at line 275 of file parse-events.c.

◆ exclude_perf()

int exclude_perf ( const struct option *  opt,
const char *arg  __maybe_unused,
int unset  __maybe_unused 
)

Definition at line 2066 of file parse-events.c.

Here is the call graph for this function:

◆ foreach_evsel_in_last_glob()

static int foreach_evsel_in_last_glob ( struct perf_evlist evlist,
int(*)(struct perf_evsel *evsel, const void *arg)  func,
const void *  arg 
)
static

Definition at line 1955 of file parse-events.c.

Here is the call graph for this function:

◆ get_config_name()

static char* get_config_name ( struct list_head *  head_terms)
static

Definition at line 302 of file parse-events.c.

Here is the call graph for this function:

◆ get_config_terms()

static int get_config_terms ( struct list_head *  head_config,
struct list_head *head_terms  __maybe_unused 
)
static

Definition at line 1116 of file parse-events.c.

Here is the call graph for this function:

◆ get_event_modifier()

static int get_event_modifier ( struct event_modifier mod,
char *  str,
struct perf_evsel evsel 
)
static

Definition at line 1516 of file parse-events.c.

Here is the call graph for this function:

◆ get_term_width()

static int get_term_width ( void  )
static

Definition at line 1871 of file parse-events.c.

Here is the call graph for this function:

◆ is_event_supported()

static bool is_event_supported ( u8  type,
unsigned  config 
)
static

Definition at line 2232 of file parse-events.c.

Here is the call graph for this function:

◆ is_same_uncore_block()

static bool is_same_uncore_block ( const char *  pmu_name_a,
const char *  pmu_name_b 
)
static

Definition at line 1362 of file parse-events.c.

◆ is_valid_tracepoint()

int is_valid_tracepoint ( const char *  event_string)

Definition at line 2196 of file parse-events.c.

◆ new_term()

static int new_term ( struct parse_events_term **  _term,
struct parse_events_term temp,
char *  str,
u64  num 
)
static

Definition at line 2543 of file parse-events.c.

Here is the call graph for this function:

◆ parse_aliases()

static int parse_aliases ( char *  str,
const char *  names[][PERF_EVSEL__MAX_ALIASES],
int  size 
)
static

Definition at line 354 of file parse-events.c.

◆ parse_breakpoint_type()

static int parse_breakpoint_type ( const char *  type,
struct perf_event_attr *  attr 
)
static

Definition at line 828 of file parse-events.c.

◆ parse_events()

int parse_events ( struct perf_evlist evlist,
const char *  str,
struct parse_events_error err 
)

Definition at line 1833 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events__clear_array()

void parse_events__clear_array ( struct parse_events_array a)

Definition at line 2686 of file parse-events.c.

◆ parse_events__is_hardcoded_term()

int parse_events__is_hardcoded_term ( struct parse_events_term term)

Definition at line 2538 of file parse-events.c.

◆ parse_events__is_name_term()

static int parse_events__is_name_term ( struct parse_events_term term)
static

Definition at line 297 of file parse-events.c.

◆ parse_events__modifier_event()

int parse_events__modifier_event ( struct list_head *  list,
char *  str,
bool  add 
)

Definition at line 1628 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events__modifier_group()

int parse_events__modifier_group ( struct list_head *  list,
char *  event_mod 
)

Definition at line 1352 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events__scanner()

static int parse_events__scanner ( const char *  str,
void *  parse_state,
int  start_token 
)
static

Definition at line 1789 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events__set_leader()

void parse_events__set_leader ( char *  name,
struct list_head *  list,
struct parse_events_state parse_state 
)

Definition at line 1470 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events__set_leader_for_uncore_aliase()

static int parse_events__set_leader_for_uncore_aliase ( char *  name,
struct list_head *  list,
struct parse_events_state parse_state 
)
static

Definition at line 1379 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events__shrink_config_terms()

void parse_events__shrink_config_terms ( void  )

Definition at line 965 of file parse-events.c.

◆ parse_events_add_breakpoint()

int parse_events_add_breakpoint ( struct list_head *  list,
int *  idx,
void *  ptr,
char *  type,
u64  len 
)

Definition at line 867 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_add_cache()

int parse_events_add_cache ( struct list_head *  list,
int *  idx,
char *  type,
char *  op_result1,
char *  op_result2,
struct parse_events_error err,
struct list_head *  head_config 
)

Definition at line 383 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_add_numeric()

int parse_events_add_numeric ( struct parse_events_state parse_state,
struct list_head *  list,
u32  type,
u64  config,
struct list_head *  head_config 
)

Definition at line 1203 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_add_pmu()

int parse_events_add_pmu ( struct parse_events_state parse_state,
struct list_head *  list,
char *  name,
struct list_head *  head_config,
bool  auto_merge_stats,
bool  use_alias 
)

Definition at line 1228 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_add_tracepoint()

int parse_events_add_tracepoint ( struct list_head *  list,
int *  idx,
const char *  sys,
const char *  event,
struct parse_events_error err,
struct list_head *  head_config 
)

Definition at line 1182 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_config_bpf()

static int parse_events_config_bpf ( struct parse_events_state parse_state,
struct bpf_object *  obj,
struct list_head *  head_config 
)
static

Definition at line 704 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_copy_term_list()

int parse_events_copy_term_list ( struct list_head *  old,
struct list_head **  new 
)

Definition at line 2641 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_evlist_error()

void parse_events_evlist_error ( struct parse_events_state parse_state,
int  idx,
const char *  str 
)

Definition at line 2691 of file parse-events.c.

◆ parse_events_formats_error_string()

char* parse_events_formats_error_string ( char *  additional_terms)

Definition at line 2734 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_load_bpf()

int parse_events_load_bpf ( struct parse_events_state parse_state,
struct list_head *  list,
char *  bpf_file_name,
bool  source,
struct list_head *  head_config 
)

Definition at line 780 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_load_bpf_obj()

int parse_events_load_bpf_obj ( struct parse_events_state parse_state,
struct list_head *  list,
struct bpf_object *  obj,
struct list_head *  head_config 
)

Definition at line 650 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_multi_pmu_add()

int parse_events_multi_pmu_add ( struct parse_events_state parse_state,
char *  str,
struct list_head **  listp 
)

Definition at line 1305 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_name()

int parse_events_name ( struct list_head *  list,
char *  name 
)

Definition at line 1665 of file parse-events.c.

◆ parse_events_option()

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

Definition at line 1939 of file parse-events.c.

◆ parse_events_parse()

int parse_events_parse ( void *  parse_state,
void *  scanner 
)

◆ parse_events_print_error()

void parse_events_print_error ( struct parse_events_error err,
const char *  event 
)

Definition at line 1879 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_term__clone()

int parse_events_term__clone ( struct parse_events_term **  new,
struct parse_events_term term 
)

Definition at line 2627 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_term__num()

int parse_events_term__num ( struct parse_events_term **  term,
int  type_term,
char *  config,
u64  num,
bool  no_value,
void *  loc_term_,
void *  loc_val_ 
)

Definition at line 2573 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_term__str()

int parse_events_term__str ( struct parse_events_term **  term,
int  type_term,
char *  config,
char *  str,
void *  loc_term_,
void *  loc_val_ 
)

Definition at line 2593 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_term__sym_hw()

int parse_events_term__sym_hw ( struct parse_events_term **  term,
char *  config,
unsigned  idx 
)

Definition at line 2611 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_terms()

int parse_events_terms ( struct list_head *  terms,
const char *  str 
)

Definition at line 1815 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_terms__delete()

void parse_events_terms__delete ( struct list_head *  terms)

Definition at line 2678 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_terms__purge()

void parse_events_terms__purge ( struct list_head *  terms)

Definition at line 2666 of file parse-events.c.

Here is the call graph for this function:

◆ parse_events_update_lists()

void parse_events_update_lists ( struct list_head *  list_event,
struct list_head *  list_all 
)

Definition at line 1489 of file parse-events.c.

Here is the call graph for this function:

◆ parse_filter()

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

Definition at line 2035 of file parse-events.c.

Here is the call graph for this function:

◆ perf_pmu__parse_check()

enum perf_pmu_event_symbol_type perf_pmu__parse_check ( const char *  name)

Definition at line 1766 of file parse-events.c.

Here is the call graph for this function:

◆ perf_pmu__parse_cleanup()

static void perf_pmu__parse_cleanup ( void  )
static

Definition at line 1686 of file parse-events.c.

◆ perf_pmu__parse_init()

static void perf_pmu__parse_init ( void  )
static

Definition at line 1713 of file parse-events.c.

Here is the call graph for this function:

◆ print_events()

void print_events ( const char *  event_glob,
bool  name_only,
bool  quiet_flag,
bool  long_desc,
bool  details_flag 
)

Definition at line 2497 of file parse-events.c.

Here is the call graph for this function:

◆ print_hwcache_events()

int print_hwcache_events ( const char *  event_glob,
bool  name_only 
)

Definition at line 2348 of file parse-events.c.

Here is the call graph for this function:

◆ print_sdt_events()

void print_sdt_events ( const char *  subsys_glob,
const char *  event_glob,
bool  name_only 
)

Definition at line 2269 of file parse-events.c.

Here is the call graph for this function:

◆ print_symbol_events()

void print_symbol_events ( const char *  event_glob,
unsigned  type,
struct event_symbol syms,
unsigned  max,
bool  name_only 
)

Definition at line 2422 of file parse-events.c.

Here is the call graph for this function:

◆ print_tracepoint_events()

void print_tracepoint_events ( const char *  subsys_glob,
const char *  event_glob,
bool  name_only 
)

Definition at line 2097 of file parse-events.c.

Here is the call graph for this function:

◆ set_filter()

static int set_filter ( struct perf_evsel evsel,
const void *  arg 
)
static

Definition at line 1987 of file parse-events.c.

Here is the call graph for this function:

◆ split_bpf_config_terms()

static void split_bpf_config_terms ( struct list_head *  evt_head_config,
struct list_head *  obj_head_config 
)
static

Definition at line 762 of file parse-events.c.

Here is the call graph for this function:

◆ tp_event_has_id()

static int tp_event_has_id ( const char *  dir_path,
struct dirent *  evt_dir 
)
static

Definition at line 159 of file parse-events.c.

◆ tracepoint_error()

static void tracepoint_error ( struct parse_events_error e,
int  err,
const char *  sys,
const char *  name 
)
static

Definition at line 457 of file parse-events.c.

◆ tracepoint_id_to_path()

struct tracepoint_path* tracepoint_id_to_path ( u64  config)

Definition at line 183 of file parse-events.c.

Here is the call graph for this function:

◆ tracepoint_name_to_path()

struct tracepoint_path* tracepoint_name_to_path ( const char *  name)

Definition at line 253 of file parse-events.c.

Here is the call graph for this function:

Variable Documentation

◆ config_term_names

const char* config_term_names[__PARSE_EVENTS__TERM_TYPE_NR]
static
Initial value:
= {
[PARSE_EVENTS__TERM_TYPE_USER] = "<sysfs term>",
[PARSE_EVENTS__TERM_TYPE_DRV_CFG] = "driver-config",
}

Definition at line 914 of file parse-events.c.

◆ config_term_shrinked

bool config_term_shrinked
static

Definition at line 934 of file parse-events.c.

◆ event_symbols_hw

struct event_symbol event_symbols_hw[PERF_COUNT_HW_MAX]

Definition at line 55 of file parse-events.c.

◆ event_symbols_sw

struct event_symbol event_symbols_sw[PERF_COUNT_SW_MAX]

Definition at line 98 of file parse-events.c.

◆ event_type_descriptors

const char* const event_type_descriptors[]
static
Initial value:
= {
"Hardware event",
"Software event",
"Tracepoint event",
"Hardware cache event",
"Raw hardware event descriptor",
"Hardware breakpoint",
}

Definition at line 2076 of file parse-events.c.

◆ perf_pmu_events_list

struct perf_pmu_event_symbol* perf_pmu_events_list
static

Definition at line 46 of file parse-events.c.

◆ perf_pmu_events_list_num

int perf_pmu_events_list_num
static

Definition at line 53 of file parse-events.c.