1 #ifndef __PERF_RECORD_H
2 #define __PERF_RECORD_H
6 #include <linux/list.h>
7 #include <linux/rbtree.h>
10 * PERF_SAMPLE_IP | PERF_SAMPLE_TID | *
13 struct perf_event_header header;
16 unsigned char __more_data[];
20 struct perf_event_header header;
25 char filename[PATH_MAX];
29 struct perf_event_header header;
35 struct perf_event_header header;
42 struct perf_event_header header;
48 * PERF_FORMAT_ENABLED | PERF_FORMAT_RUNNING | PERF_FORMAT_ID
51 struct perf_event_header header;
60 struct perf_event_header header;
65 typedef union event_union {
66 struct perf_event_header header;
68 struct mmap_event mmap;
69 struct comm_event comm;
70 struct fork_event fork;
71 struct lost_event lost;
72 struct read_event read;
73 struct sample_event sample;
78 struct rb_node rb_node;
79 struct list_head node;
84 u64 (*map_ip)(struct map *, u64);
85 u64 (*unmap_ip)(struct map *, u64);
89 static inline u64 map__map_ip(struct map *map, u64 ip)
91 return ip - map->start + map->pgoff;
94 static inline u64 map__unmap_ip(struct map *map, u64 ip)
96 return ip + map->start - map->pgoff;
99 static inline u64 identity__map_ip(struct map *map __used, u64 ip)
106 typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym);
108 struct map *map__new(struct mmap_event *event, char *cwd, int cwdlen,
109 unsigned int sym_priv_size, symbol_filter_t filter);
110 struct map *map__clone(struct map *self);
111 int map__overlap(struct map *l, struct map *r);
112 size_t map__fprintf(struct map *self, FILE *fp);
114 #endif /* __PERF_RECORD_H */