|
| #define | FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y)) |
| |
| #define | FUNCTION_EVENT "ftrace:function" |
| |
| #define | MOD_PRINT(context, mod) |
| |
| #define | C(x) PERF_COUNT_HW_CACHE_##x |
| |
| #define | CACHE_READ (1 << C(OP_READ)) |
| |
| #define | CACHE_WRITE (1 << C(OP_WRITE)) |
| |
| #define | CACHE_PREFETCH (1 << C(OP_PREFETCH)) |
| |
| #define | COP(x) (1 << x) |
| |
| #define | bit_name(n) { PERF_SAMPLE_##n, #n } |
| |
| #define | bit_name(n) { PERF_SAMPLE_BRANCH_##n, #n } |
| |
| #define | bit_name(n) { PERF_FORMAT_##n, #n } |
| |
| #define | BUF_SIZE 1024 |
| |
| #define | p_hex(val) snprintf(buf, BUF_SIZE, "%#"PRIx64, (uint64_t)(val)) |
| |
| #define | p_unsigned(val) snprintf(buf, BUF_SIZE, "%"PRIu64, (uint64_t)(val)) |
| |
| #define | p_signed(val) snprintf(buf, BUF_SIZE, "%"PRId64, (int64_t)(val)) |
| |
| #define | p_sample_type(val) __p_sample_type(buf, BUF_SIZE, val) |
| |
| #define | p_branch_sample_type(val) __p_branch_sample_type(buf, BUF_SIZE, val) |
| |
| #define | p_read_format(val) __p_read_format(buf, BUF_SIZE, val) |
| |
| #define | PRINT_ATTRn(_n, _f, _p) |
| |
| #define | PRINT_ATTRf(_f, _p) PRINT_ATTRn(#_f, _f, _p) |
| |
| #define | OVERFLOW_CHECK(offset, size, max_size) |
| |
| #define | OVERFLOW_CHECK_u64(offset) OVERFLOW_CHECK(offset, sizeof(u64), sizeof(u64)) |
| |
|
| static int | perf_evsel__no_extra_init (struct perf_evsel *evsel __maybe_unused) |
| |
| void __weak | test_attr__ready (void) |
| |
| static void | perf_evsel__no_extra_fini (struct perf_evsel *evsel __maybe_unused) |
| |
| int | perf_evsel__object_config (size_t object_size, int(*init)(struct perf_evsel *evsel), void(*fini)(struct perf_evsel *evsel)) |
| |
| int | __perf_evsel__sample_size (u64 sample_type) |
| |
| static int | __perf_evsel__calc_id_pos (u64 sample_type) |
| |
| static int | __perf_evsel__calc_is_pos (u64 sample_type) |
| |
| void | perf_evsel__calc_id_pos (struct perf_evsel *evsel) |
| |
| void | __perf_evsel__set_sample_bit (struct perf_evsel *evsel, enum perf_event_sample_format bit) |
| |
| void | __perf_evsel__reset_sample_bit (struct perf_evsel *evsel, enum perf_event_sample_format bit) |
| |
| void | perf_evsel__set_sample_id (struct perf_evsel *evsel, bool can_sample_identifier) |
| |
| bool | perf_evsel__is_function_event (struct perf_evsel *evsel) |
| |
| void | perf_evsel__init (struct perf_evsel *evsel, struct perf_event_attr *attr, int idx) |
| |
| struct perf_evsel * | perf_evsel__new_idx (struct perf_event_attr *attr, int idx) |
| |
| static bool | perf_event_can_profile_kernel (void) |
| |
| struct perf_evsel * | perf_evsel__new_cycles (bool precise) |
| |
| struct perf_evsel * | perf_evsel__newtp_idx (const char *sys, const char *name, int idx) |
| |
| static const char * | __perf_evsel__hw_name (u64 config) |
| |
| static int | perf_evsel__add_modifiers (struct perf_evsel *evsel, char *bf, size_t size) |
| |
| static int | perf_evsel__hw_name (struct perf_evsel *evsel, char *bf, size_t size) |
| |
| static const char * | __perf_evsel__sw_name (u64 config) |
| |
| static int | perf_evsel__sw_name (struct perf_evsel *evsel, char *bf, size_t size) |
| |
| static int | __perf_evsel__bp_name (char *bf, size_t size, u64 addr, u64 type) |
| |
| static int | perf_evsel__bp_name (struct perf_evsel *evsel, char *bf, size_t size) |
| |
| bool | perf_evsel__is_cache_op_valid (u8 type, u8 op) |
| |
| int | __perf_evsel__hw_cache_type_op_res_name (u8 type, u8 op, u8 result, char *bf, size_t size) |
| |
| static int | __perf_evsel__hw_cache_name (u64 config, char *bf, size_t size) |
| |
| static int | perf_evsel__hw_cache_name (struct perf_evsel *evsel, char *bf, size_t size) |
| |
| static int | perf_evsel__raw_name (struct perf_evsel *evsel, char *bf, size_t size) |
| |
| const char * | perf_evsel__name (struct perf_evsel *evsel) |
| |
| const char * | perf_evsel__group_name (struct perf_evsel *evsel) |
| |
| int | perf_evsel__group_desc (struct perf_evsel *evsel, char *buf, size_t size) |
| |
| static void | __perf_evsel__config_callchain (struct perf_evsel *evsel, struct record_opts *opts, struct callchain_param *param) |
| |
| void | perf_evsel__config_callchain (struct perf_evsel *evsel, struct record_opts *opts, struct callchain_param *param) |
| |
| static void | perf_evsel__reset_callgraph (struct perf_evsel *evsel, struct callchain_param *param) |
| |
| static void | apply_config_terms (struct perf_evsel *evsel, struct record_opts *opts, bool track) |
| |
| void | perf_evsel__config (struct perf_evsel *evsel, struct record_opts *opts, struct callchain_param *callchain) |
| |
| static int | perf_evsel__alloc_fd (struct perf_evsel *evsel, int ncpus, int nthreads) |
| |
| static int | perf_evsel__run_ioctl (struct perf_evsel *evsel, int ioc, void *arg) |
| |
| int | perf_evsel__apply_filter (struct perf_evsel *evsel, const char *filter) |
| |
| int | perf_evsel__set_filter (struct perf_evsel *evsel, const char *filter) |
| |
| static int | perf_evsel__append_filter (struct perf_evsel *evsel, const char *fmt, const char *filter) |
| |
| int | perf_evsel__append_tp_filter (struct perf_evsel *evsel, const char *filter) |
| |
| int | perf_evsel__append_addr_filter (struct perf_evsel *evsel, const char *filter) |
| |
| int | perf_evsel__enable (struct perf_evsel *evsel) |
| |
| int | perf_evsel__disable (struct perf_evsel *evsel) |
| |
| int | perf_evsel__alloc_id (struct perf_evsel *evsel, int ncpus, int nthreads) |
| |
| static void | perf_evsel__free_fd (struct perf_evsel *evsel) |
| |
| static void | perf_evsel__free_id (struct perf_evsel *evsel) |
| |
| static void | perf_evsel__free_config_terms (struct perf_evsel *evsel) |
| |
| void | perf_evsel__close_fd (struct perf_evsel *evsel) |
| |
| void | perf_evsel__exit (struct perf_evsel *evsel) |
| |
| void | perf_evsel__delete (struct perf_evsel *evsel) |
| |
| void | perf_evsel__compute_deltas (struct perf_evsel *evsel, int cpu, int thread, struct perf_counts_values *count) |
| |
| void | perf_counts_values__scale (struct perf_counts_values *count, bool scale, s8 *pscaled) |
| |
| static int | perf_evsel__read_size (struct perf_evsel *evsel) |
| |
| int | perf_evsel__read (struct perf_evsel *evsel, int cpu, int thread, struct perf_counts_values *count) |
| |
| static int | perf_evsel__read_one (struct perf_evsel *evsel, int cpu, int thread) |
| |
| static void | perf_evsel__set_count (struct perf_evsel *counter, int cpu, int thread, u64 val, u64 ena, u64 run) |
| |
| static int | perf_evsel__process_group_data (struct perf_evsel *leader, int cpu, int thread, u64 *data) |
| |
| static int | perf_evsel__read_group (struct perf_evsel *leader, int cpu, int thread) |
| |
| int | perf_evsel__read_counter (struct perf_evsel *evsel, int cpu, int thread) |
| |
| int | __perf_evsel__read_on_cpu (struct perf_evsel *evsel, int cpu, int thread, bool scale) |
| |
| static int | get_group_fd (struct perf_evsel *evsel, int cpu, int thread) |
| |
| static void | __p_bits (char *buf, size_t size, u64 value, struct bit_names *bits) |
| |
| static void | __p_sample_type (char *buf, size_t size, u64 value) |
| |
| static void | __p_branch_sample_type (char *buf, size_t size, u64 value) |
| |
| static void | __p_read_format (char *buf, size_t size, u64 value) |
| |
| int | perf_event_attr__fprintf (FILE *fp, struct perf_event_attr *attr, attr__fprintf_f attr__fprintf, void *priv) |
| |
| static int | __open_attr__fprintf (FILE *fp, const char *name, const char *val, void *priv __maybe_unused) |
| |
| static void | perf_evsel__remove_fd (struct perf_evsel *pos, int nr_cpus, int nr_threads, int thread_idx) |
| |
| static int | update_fds (struct perf_evsel *evsel, int nr_cpus, int cpu_idx, int nr_threads, int thread_idx) |
| |
| static bool | ignore_missing_thread (struct perf_evsel *evsel, int nr_cpus, int cpu, struct thread_map *threads, int thread, int err) |
| |
| int | perf_evsel__open (struct perf_evsel *evsel, struct cpu_map *cpus, struct thread_map *threads) |
| |
| void | perf_evsel__close (struct perf_evsel *evsel) |
| |
| int | perf_evsel__open_per_cpu (struct perf_evsel *evsel, struct cpu_map *cpus) |
| |
| int | perf_evsel__open_per_thread (struct perf_evsel *evsel, struct thread_map *threads) |
| |
| static int | perf_evsel__parse_id_sample (const struct perf_evsel *evsel, const union perf_event *event, struct perf_sample *sample) |
| |
| static bool | overflow (const void *endp, u16 max_size, const void *offset, u64 size) |
| |
| static int | perf_event__check_size (union perf_event *event, unsigned int sample_size) |
| |
| int | perf_evsel__parse_sample (struct perf_evsel *evsel, union perf_event *event, struct perf_sample *data) |
| |
| int | perf_evsel__parse_sample_timestamp (struct perf_evsel *evsel, union perf_event *event, u64 *timestamp) |
| |
| size_t | perf_event__sample_event_size (const struct perf_sample *sample, u64 type, u64 read_format) |
| |
| int | perf_event__synthesize_sample (union perf_event *event, u64 type, u64 read_format, const struct perf_sample *sample) |
| |
| struct format_field * | perf_evsel__field (struct perf_evsel *evsel, const char *name) |
| |
| void * | perf_evsel__rawptr (struct perf_evsel *evsel, struct perf_sample *sample, const char *name) |
| |
| u64 | format_field__intval (struct format_field *field, struct perf_sample *sample, bool needs_swap) |
| |
| u64 | perf_evsel__intval (struct perf_evsel *evsel, struct perf_sample *sample, const char *name) |
| |
| bool | perf_evsel__fallback (struct perf_evsel *evsel, int err, char *msg, size_t msgsize) |
| |
| static bool | find_process (const char *name) |
| |
| int | perf_evsel__open_strerror (struct perf_evsel *evsel, struct target *target, int err, char *msg, size_t size) |
| |
| struct perf_env * | perf_evsel__env (struct perf_evsel *evsel) |
| |