1 #ifndef __PERF_SESSION_H
2 #define __PERF_SESSION_H
7 #include <linux/rbtree.h>
8 #include "../../../include/linux/perf_event.h"
15 struct perf_header header;
17 unsigned long mmap_window;
18 struct map_groups kmaps;
19 struct rb_root threads;
20 struct thread *last_match;
21 struct map *vmlinux_maps[MAP__NR_TYPES];
22 struct events_stats events_stats;
23 unsigned long event_total[PERF_RECORD_MAX];
24 unsigned long unknown_events;
37 typedef int (*event_op)(event_t *self, struct perf_session *session);
39 struct perf_event_ops {
51 struct perf_session *perf_session__new(const char *filename, int mode, bool force);
52 void perf_session__delete(struct perf_session *self);
54 int perf_session__process_events(struct perf_session *self,
55 struct perf_event_ops *event_ops);
57 struct symbol **perf_session__resolve_callchain(struct perf_session *self,
58 struct thread *thread,
59 struct ip_callchain *chain,
60 struct symbol **parent);
62 bool perf_session__has_traces(struct perf_session *self, const char *msg);
64 int perf_header__read_build_ids(int input, u64 offset, u64 file_size);
66 int perf_session__set_kallsyms_ref_reloc_sym(struct perf_session *self,
67 const char *symbol_name,
69 void perf_session__reloc_vmlinux_maps(struct perf_session *self,
70 u64 unrelocated_addr);
72 #endif /* __PERF_SESSION_H */