2 #ifndef __PERF_RECORD_H 3 #define __PERF_RECORD_H 7 #include <linux/kernel.h> 47 struct perf_ns_link_info link_info[];
87 #define PERF_SAMPLE_MASK \ 88 (PERF_SAMPLE_IP | PERF_SAMPLE_TID | \ 89 PERF_SAMPLE_TIME | PERF_SAMPLE_ADDR | \ 90 PERF_SAMPLE_ID | PERF_SAMPLE_STREAM_ID | \ 91 PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD | \ 92 PERF_SAMPLE_IDENTIFIER) 95 #define PERF_SAMPLE_MAX_SIZE (1 << 16) 175 #define PERF_IP_FLAG_CHARS "bcrosyiABEx" 177 #define PERF_BRANCH_MASK (\ 178 PERF_IP_FLAG_BRANCH |\ 180 PERF_IP_FLAG_RETURN |\ 181 PERF_IP_FLAG_CONDITIONAL |\ 182 PERF_IP_FLAG_SYSCALLRET |\ 183 PERF_IP_FLAG_ASYNC |\ 184 PERF_IP_FLAG_INTERRUPT |\ 185 PERF_IP_FLAG_TX_ABORT |\ 186 PERF_IP_FLAG_TRACE_BEGIN |\ 187 PERF_IP_FLAG_TRACE_END) 219 #define PERF_MEM_DATA_SRC_NONE \ 220 (PERF_MEM_S(OP, NA) |\ 221 PERF_MEM_S(LVL, NA) |\ 222 PERF_MEM_S(SNOOP, NA) |\ 223 PERF_MEM_S(LOCK, NA) |\ 261 #define PERF_TYPE_SYNTH (INT_MAX + 1U) 339 u64 deepest_cstate : 4,
377 #define perf_synth__raw_size(d) (sizeof(d) - 4) 379 #define perf_sample__bad_synth_size(s, d) ((s)->raw_size < sizeof(d) - 4) 431 unsigned long mask[];
473 #define MAX_EVENT_NAME 64 521 #define MAX_AUXTRACE_ERROR_MSG 64 673 unsigned int proc_map_timeout);
685 unsigned int proc_map_timeout,
686 unsigned int nr_threads_synthesize);
697 u32 cpu, u32
thread, u64
id,
791 pid_t pid, pid_t tgid,
797 pid_t pid, pid_t tgid,
801 unsigned int proc_map_timeout);
820 const char *symbol_name, u64 *addr);
void event_attr_init(struct perf_event_attr *attr)
int perf_event__synthesize_stat(struct perf_tool *tool, u32 cpu, u32 thread, u64 id, struct perf_counts_values *count, perf_event__handler_t process, struct machine *machine)
int perf_event__process_mmap(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
pid_t perf_event__synthesize_comm(struct perf_tool *tool, union perf_event *event, pid_t pid, perf_event__handler_t process, struct machine *machine)
int perf_event__synthesize_kernel_mmap(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine)
size_t perf_event__fprintf_thread_map(union perf_event *event, FILE *fp)
int perf_event__synthesize_extra_kmaps(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine)
int perf_event__synthesize_cpu_map(struct perf_tool *tool, struct cpu_map *cpus, perf_event__handler_t process, struct machine *machine)
int perf_event__synthesize_modules(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine)
int(* perf_event__handler_t)(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
void perf_event__print_totals(void)
static void * perf_sample__synth_ptr(struct perf_sample *sample)
#define MAX_AUXTRACE_ERROR_MSG
struct ip_callchain * callchain
static void * perf_synth__raw_data(void *p)
int perf_event__process_fork(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
const char * perf_event__name(unsigned int id)
size_t perf_event__fprintf_cpu_map(union perf_event *event, FILE *fp)
size_t perf_event__fprintf_namespaces(union perf_event *event, FILE *fp)
void * cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max)
int perf_event__synthesize_thread_map2(struct perf_tool *tool, struct thread_map *threads, perf_event__handler_t process, struct machine *machine)
int perf_event__synthesize_stat_config(struct perf_tool *tool, struct perf_stat_config *config, perf_event__handler_t process, struct machine *machine)
int perf_event__process_itrace_start(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
struct sample_read_value * values
size_t perf_event__fprintf(union perf_event *event, FILE *fp)
bool sample_addr_correlates_sym(struct perf_event_attr *attr)
u8 build_id[PERF_ALIGN(BUILD_ID_SIZE, sizeof(u64))]
int perf_event__process_aux(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
const char * event_type(int type)
int perf_event__synthesize_sample(union perf_event *event, u64 type, u64 read_format, const struct perf_sample *sample)
int perf_event__process_mmap2(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
int machine__resolve(struct machine *machine, struct addr_location *al, struct perf_sample *sample)
int perf_event__synthesize_threads(struct perf_tool *tool, perf_event__handler_t process, struct machine *machine, bool mmap_data, unsigned int proc_map_timeout, unsigned int nr_threads_synthesize)
int perf_event__synthesize_mmap_events(struct perf_tool *tool, union perf_event *event, pid_t pid, pid_t tgid, perf_event__handler_t process, struct machine *machine, bool mmap_data, unsigned int proc_map_timeout)
int perf_event__synthesize_namespaces(struct perf_tool *tool, union perf_event *event, pid_t pid, pid_t tgid, perf_event__handler_t process, struct machine *machine)
size_t perf_event__fprintf_mmap2(union perf_event *event, FILE *fp)
u32 nr_non_filtered_samples
static struct perf_tool tool
int perf_event__process_lost(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
struct branch_stack * branch_stack
size_t perf_event__fprintf_comm(union perf_event *event, FILE *fp)
int perf_tool__process_synth_event(struct perf_tool *tool, union perf_event *event, struct machine *machine, perf_event__handler_t process)
int perf_event__process_switch(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
int perf_event_paranoid(void)
int perf_event__process_exit(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
int perf_event__process(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
u32 nr_unprocessable_samples
size_t perf_event__fprintf_itrace_start(union perf_event *event, FILE *fp)
void thread__resolve(struct thread *thread, struct addr_location *al, struct perf_sample *sample)
void addr_location__put(struct addr_location *al)
void perf_event__read_stat_config(struct perf_stat_config *config, struct stat_config_event *event)
size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type, u64 read_format)
size_t perf_event__fprintf_aux(union perf_event *event, FILE *fp)
struct perf_event_header header
int sysctl_perf_event_max_contexts_per_stack
bool is_bts_event(struct perf_event_attr *attr)
size_t perf_event__fprintf_mmap(union perf_event *event, FILE *fp)
u64 total_non_filtered_period
static struct perf_stat_config stat_config
int perf_event__synthesize_thread_map(struct perf_tool *tool, struct thread_map *threads, perf_event__handler_t process, struct machine *machine, bool mmap_data, unsigned int proc_map_timeout)
int sysctl_perf_event_max_stack
int perf_event__process_comm(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
int perf_event__synthesize_stat_round(struct perf_tool *tool, u64 time, u64 type, perf_event__handler_t process, struct machine *machine)
void cpu_map_data__synthesize(struct cpu_map_data *data, struct cpu_map *map, u16 type, int max)
int perf_event__process_lost_samples(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
size_t perf_event__fprintf_switch(union perf_event *event, FILE *fp)
size_t perf_event__fprintf_task(union perf_event *event, FILE *fp)
int kallsyms__get_function_start(const char *kallsyms_filename, const char *symbol_name, u64 *addr)
int perf_event__process_namespaces(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)