Ingo Molnar | cdd6c48 | 2009-09-21 12:02:48 +0200 | [diff] [blame] | 1 | #ifndef __PERF_RECORD_H |
| 2 | #define __PERF_RECORD_H |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 3 | |
Arnaldo Carvalho de Melo | 4a58e61 | 2009-12-27 21:37:00 -0200 | [diff] [blame] | 4 | #include <limits.h> |
Arnaldo Carvalho de Melo | 482ad89 | 2011-12-02 11:06:37 -0200 | [diff] [blame] | 5 | #include <stdio.h> |
Arnaldo Carvalho de Melo | 4a58e61 | 2009-12-27 21:37:00 -0200 | [diff] [blame] | 6 | |
Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame] | 7 | #include "../perf.h" |
Arnaldo Carvalho de Melo | 4a58e61 | 2009-12-27 21:37:00 -0200 | [diff] [blame] | 8 | #include "map.h" |
Jiri Olsa | 4383db8 | 2012-10-27 23:18:29 +0200 | [diff] [blame] | 9 | #include "build-id.h" |
Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame] | 10 | |
Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame] | 11 | struct mmap_event { |
| 12 | struct perf_event_header header; |
| 13 | u32 pid, tid; |
| 14 | u64 start; |
| 15 | u64 len; |
| 16 | u64 pgoff; |
| 17 | char filename[PATH_MAX]; |
| 18 | }; |
| 19 | |
Stephane Eranian | 5c5e854 | 2013-08-21 12:10:25 +0200 | [diff] [blame] | 20 | struct mmap2_event { |
| 21 | struct perf_event_header header; |
| 22 | u32 pid, tid; |
| 23 | u64 start; |
| 24 | u64 len; |
| 25 | u64 pgoff; |
| 26 | u32 maj; |
| 27 | u32 min; |
| 28 | u64 ino; |
| 29 | u64 ino_generation; |
| 30 | char filename[PATH_MAX]; |
| 31 | }; |
| 32 | |
Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame] | 33 | struct comm_event { |
| 34 | struct perf_event_header header; |
| 35 | u32 pid, tid; |
| 36 | char comm[16]; |
| 37 | }; |
| 38 | |
| 39 | struct fork_event { |
| 40 | struct perf_event_header header; |
| 41 | u32 pid, ppid; |
| 42 | u32 tid, ptid; |
Arjan van de Ven | 393b2ad | 2009-09-12 07:52:47 +0200 | [diff] [blame] | 43 | u64 time; |
Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | struct lost_event { |
| 47 | struct perf_event_header header; |
| 48 | u64 id; |
| 49 | u64 lost; |
| 50 | }; |
| 51 | |
Peter Zijlstra | 18408dd | 2009-08-13 11:47:55 +0200 | [diff] [blame] | 52 | /* |
| 53 | * PERF_FORMAT_ENABLED | PERF_FORMAT_RUNNING | PERF_FORMAT_ID |
| 54 | */ |
Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame] | 55 | struct read_event { |
| 56 | struct perf_event_header header; |
Ingo Molnar | dc02bf7 | 2009-09-16 13:45:00 +0200 | [diff] [blame] | 57 | u32 pid, tid; |
Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame] | 58 | u64 value; |
| 59 | u64 time_enabled; |
| 60 | u64 time_running; |
| 61 | u64 id; |
| 62 | }; |
| 63 | |
Jiri Olsa | dd96c46 | 2013-09-01 12:36:15 +0200 | [diff] [blame] | 64 | struct throttle_event { |
| 65 | struct perf_event_header header; |
| 66 | u64 time; |
| 67 | u64 id; |
| 68 | u64 stream_id; |
| 69 | }; |
Frederic Weisbecker | a285412 | 2011-05-21 19:33:04 +0200 | [diff] [blame] | 70 | |
| 71 | #define PERF_SAMPLE_MASK \ |
| 72 | (PERF_SAMPLE_IP | PERF_SAMPLE_TID | \ |
| 73 | PERF_SAMPLE_TIME | PERF_SAMPLE_ADDR | \ |
| 74 | PERF_SAMPLE_ID | PERF_SAMPLE_STREAM_ID | \ |
Adrian Hunter | 7556257 | 2013-08-27 11:23:09 +0300 | [diff] [blame] | 75 | PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD | \ |
| 76 | PERF_SAMPLE_IDENTIFIER) |
Frederic Weisbecker | a285412 | 2011-05-21 19:33:04 +0200 | [diff] [blame] | 77 | |
Jiri Olsa | a65cb4b | 2013-10-02 15:46:39 +0200 | [diff] [blame] | 78 | /* perf sample has 16 bits size limit */ |
| 79 | #define PERF_SAMPLE_MAX_SIZE (1 << 16) |
| 80 | |
OGAWA Hirofumi | 180f95e | 2009-12-06 20:08:24 +0900 | [diff] [blame] | 81 | struct sample_event { |
Arjan van de Ven | fd39e05 | 2009-09-12 07:53:00 +0200 | [diff] [blame] | 82 | struct perf_event_header header; |
| 83 | u64 array[]; |
| 84 | }; |
| 85 | |
Jiri Olsa | 0f6a301 | 2012-08-07 15:20:45 +0200 | [diff] [blame] | 86 | struct regs_dump { |
Adrian Hunter | 5b95a4a3 | 2013-08-27 11:23:10 +0300 | [diff] [blame] | 87 | u64 abi; |
Jiri Olsa | 352ea45 | 2014-01-07 13:47:25 +0100 | [diff] [blame] | 88 | u64 mask; |
Jiri Olsa | 0f6a301 | 2012-08-07 15:20:45 +0200 | [diff] [blame] | 89 | u64 *regs; |
| 90 | }; |
| 91 | |
| 92 | struct stack_dump { |
| 93 | u16 offset; |
| 94 | u64 size; |
| 95 | char *data; |
| 96 | }; |
| 97 | |
Jiri Olsa | 9ede473 | 2012-10-10 17:38:13 +0200 | [diff] [blame] | 98 | struct sample_read_value { |
| 99 | u64 value; |
| 100 | u64 id; |
| 101 | }; |
| 102 | |
| 103 | struct sample_read { |
| 104 | u64 time_enabled; |
| 105 | u64 time_running; |
| 106 | union { |
| 107 | struct { |
| 108 | u64 nr; |
| 109 | struct sample_read_value *values; |
| 110 | } group; |
| 111 | struct sample_read_value one; |
| 112 | }; |
| 113 | }; |
| 114 | |
Jiri Olsa | 0776eb5 | 2014-05-05 12:41:45 +0200 | [diff] [blame] | 115 | struct ip_callchain { |
| 116 | u64 nr; |
| 117 | u64 ips[0]; |
| 118 | }; |
| 119 | |
| 120 | struct branch_flags { |
| 121 | u64 mispred:1; |
| 122 | u64 predicted:1; |
| 123 | u64 in_tx:1; |
| 124 | u64 abort:1; |
| 125 | u64 reserved:60; |
| 126 | }; |
| 127 | |
| 128 | struct branch_entry { |
| 129 | u64 from; |
| 130 | u64 to; |
| 131 | struct branch_flags flags; |
| 132 | }; |
| 133 | |
| 134 | struct branch_stack { |
| 135 | u64 nr; |
| 136 | struct branch_entry entries[0]; |
| 137 | }; |
| 138 | |
Arnaldo Carvalho de Melo | 8d50e5b | 2011-01-29 13:02:00 -0200 | [diff] [blame] | 139 | struct perf_sample { |
OGAWA Hirofumi | 180f95e | 2009-12-06 20:08:24 +0900 | [diff] [blame] | 140 | u64 ip; |
| 141 | u32 pid, tid; |
| 142 | u64 time; |
| 143 | u64 addr; |
| 144 | u64 id; |
| 145 | u64 stream_id; |
OGAWA Hirofumi | 180f95e | 2009-12-06 20:08:24 +0900 | [diff] [blame] | 146 | u64 period; |
Andi Kleen | 0548429 | 2013-01-24 16:10:29 +0100 | [diff] [blame] | 147 | u64 weight; |
Andi Kleen | 475eeab | 2013-09-20 07:40:43 -0700 | [diff] [blame] | 148 | u64 transaction; |
Arnaldo Carvalho de Melo | eed05fe | 2010-04-05 12:53:45 -0300 | [diff] [blame] | 149 | u32 cpu; |
OGAWA Hirofumi | 180f95e | 2009-12-06 20:08:24 +0900 | [diff] [blame] | 150 | u32 raw_size; |
Stephane Eranian | 98a3b32 | 2013-01-24 16:10:35 +0100 | [diff] [blame] | 151 | u64 data_src; |
OGAWA Hirofumi | 180f95e | 2009-12-06 20:08:24 +0900 | [diff] [blame] | 152 | void *raw_data; |
Arnaldo Carvalho de Melo | eed05fe | 2010-04-05 12:53:45 -0300 | [diff] [blame] | 153 | struct ip_callchain *callchain; |
Roberto Agostino Vitillo | b538752 | 2012-02-09 23:21:01 +0100 | [diff] [blame] | 154 | struct branch_stack *branch_stack; |
Jiri Olsa | 0f6a301 | 2012-08-07 15:20:45 +0200 | [diff] [blame] | 155 | struct regs_dump user_regs; |
| 156 | struct stack_dump user_stack; |
Jiri Olsa | 9ede473 | 2012-10-10 17:38:13 +0200 | [diff] [blame] | 157 | struct sample_read read; |
OGAWA Hirofumi | 180f95e | 2009-12-06 20:08:24 +0900 | [diff] [blame] | 158 | }; |
| 159 | |
Stephane Eranian | 98a3b32 | 2013-01-24 16:10:35 +0100 | [diff] [blame] | 160 | #define PERF_MEM_DATA_SRC_NONE \ |
| 161 | (PERF_MEM_S(OP, NA) |\ |
| 162 | PERF_MEM_S(LVL, NA) |\ |
| 163 | PERF_MEM_S(SNOOP, NA) |\ |
| 164 | PERF_MEM_S(LOCK, NA) |\ |
| 165 | PERF_MEM_S(TLB, NA)) |
| 166 | |
Arnaldo Carvalho de Melo | 8d06367 | 2009-11-04 18:50:43 -0200 | [diff] [blame] | 167 | struct build_id_event { |
| 168 | struct perf_event_header header; |
Zhang, Yanmin | a1645ce | 2010-04-19 13:32:50 +0800 | [diff] [blame] | 169 | pid_t pid; |
Irina Tirdea | 9ac3e48 | 2012-09-11 01:15:01 +0300 | [diff] [blame] | 170 | u8 build_id[PERF_ALIGN(BUILD_ID_SIZE, sizeof(u64))]; |
Arnaldo Carvalho de Melo | 8d06367 | 2009-11-04 18:50:43 -0200 | [diff] [blame] | 171 | char filename[]; |
| 172 | }; |
Arjan van de Ven | fd39e05 | 2009-09-12 07:53:00 +0200 | [diff] [blame] | 173 | |
Frederic Weisbecker | 9840280 | 2010-05-02 22:05:29 +0200 | [diff] [blame] | 174 | enum perf_user_event_type { /* above any possible kernel type */ |
Thomas Gleixner | 9aefcab | 2010-12-07 12:48:47 +0000 | [diff] [blame] | 175 | PERF_RECORD_USER_TYPE_START = 64, |
Tom Zanussi | 2c46dbb | 2010-04-01 23:59:19 -0500 | [diff] [blame] | 176 | PERF_RECORD_HEADER_ATTR = 64, |
Jiri Olsa | 6065210 | 2013-07-11 17:28:33 +0200 | [diff] [blame] | 177 | PERF_RECORD_HEADER_EVENT_TYPE = 65, /* depreceated */ |
Tom Zanussi | 9215545 | 2010-04-01 23:59:21 -0500 | [diff] [blame] | 178 | PERF_RECORD_HEADER_TRACING_DATA = 66, |
Tom Zanussi | c7929e4 | 2010-04-01 23:59:22 -0500 | [diff] [blame] | 179 | PERF_RECORD_HEADER_BUILD_ID = 67, |
Frederic Weisbecker | 9840280 | 2010-05-02 22:05:29 +0200 | [diff] [blame] | 180 | PERF_RECORD_FINISHED_ROUND = 68, |
Tom Zanussi | 2c46dbb | 2010-04-01 23:59:19 -0500 | [diff] [blame] | 181 | PERF_RECORD_HEADER_MAX |
| 182 | }; |
| 183 | |
| 184 | struct attr_event { |
| 185 | struct perf_event_header header; |
| 186 | struct perf_event_attr attr; |
| 187 | u64 id[]; |
Tom Zanussi | 8dc5810 | 2010-04-01 23:59:15 -0500 | [diff] [blame] | 188 | }; |
| 189 | |
Tom Zanussi | cd19a03 | 2010-04-01 23:59:20 -0500 | [diff] [blame] | 190 | #define MAX_EVENT_NAME 64 |
| 191 | |
| 192 | struct perf_trace_event_type { |
| 193 | u64 event_id; |
| 194 | char name[MAX_EVENT_NAME]; |
| 195 | }; |
| 196 | |
| 197 | struct event_type_event { |
| 198 | struct perf_event_header header; |
| 199 | struct perf_trace_event_type event_type; |
| 200 | }; |
| 201 | |
Tom Zanussi | 9215545 | 2010-04-01 23:59:21 -0500 | [diff] [blame] | 202 | struct tracing_data_event { |
| 203 | struct perf_event_header header; |
| 204 | u32 size; |
| 205 | }; |
| 206 | |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 207 | union perf_event { |
Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame] | 208 | struct perf_event_header header; |
Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame] | 209 | struct mmap_event mmap; |
Stephane Eranian | 5c5e854 | 2013-08-21 12:10:25 +0200 | [diff] [blame] | 210 | struct mmap2_event mmap2; |
Frederic Weisbecker | 1fe2c10 | 2009-08-12 10:19:53 +0200 | [diff] [blame] | 211 | struct comm_event comm; |
| 212 | struct fork_event fork; |
| 213 | struct lost_event lost; |
| 214 | struct read_event read; |
Jiri Olsa | dd96c46 | 2013-09-01 12:36:15 +0200 | [diff] [blame] | 215 | struct throttle_event throttle; |
Arjan van de Ven | fd39e05 | 2009-09-12 07:53:00 +0200 | [diff] [blame] | 216 | struct sample_event sample; |
Tom Zanussi | 2c46dbb | 2010-04-01 23:59:19 -0500 | [diff] [blame] | 217 | struct attr_event attr; |
Tom Zanussi | cd19a03 | 2010-04-01 23:59:20 -0500 | [diff] [blame] | 218 | struct event_type_event event_type; |
Tom Zanussi | 9215545 | 2010-04-01 23:59:21 -0500 | [diff] [blame] | 219 | struct tracing_data_event tracing_data; |
Tom Zanussi | c7929e4 | 2010-04-01 23:59:22 -0500 | [diff] [blame] | 220 | struct build_id_event build_id; |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 221 | }; |
Frederic Weisbecker | 66e274f | 2009-08-12 11:07:25 +0200 | [diff] [blame] | 222 | |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 223 | void perf_event__print_totals(void); |
Arnaldo Carvalho de Melo | 62daacb | 2009-11-27 16:29:22 -0200 | [diff] [blame] | 224 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 225 | struct perf_tool; |
Arnaldo Carvalho de Melo | 401b8e1 | 2011-02-10 12:52:47 -0200 | [diff] [blame] | 226 | struct thread_map; |
Arnaldo Carvalho de Melo | 4aa6563 | 2009-12-13 19:50:29 -0200 | [diff] [blame] | 227 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 228 | typedef int (*perf_event__handler_t)(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 229 | union perf_event *event, |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 230 | struct perf_sample *sample, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 231 | struct machine *machine); |
Arnaldo Carvalho de Melo | cf55311 | 2010-01-07 19:59:40 -0200 | [diff] [blame] | 232 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 233 | int perf_event__synthesize_thread_map(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 234 | struct thread_map *threads, |
Arnaldo Carvalho de Melo | 7c940c1 | 2011-02-11 11:45:54 -0200 | [diff] [blame] | 235 | perf_event__handler_t process, |
Arnaldo Carvalho de Melo | 62605dc50 | 2013-11-11 09:44:09 -0300 | [diff] [blame] | 236 | struct machine *machine, bool mmap_data); |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 237 | int perf_event__synthesize_threads(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 238 | perf_event__handler_t process, |
Arnaldo Carvalho de Melo | 62605dc50 | 2013-11-11 09:44:09 -0300 | [diff] [blame] | 239 | struct machine *machine, bool mmap_data); |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 240 | int perf_event__synthesize_kernel_mmap(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 241 | perf_event__handler_t process, |
Adrian Hunter | 0ae617b | 2014-01-29 16:14:40 +0200 | [diff] [blame] | 242 | struct machine *machine); |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 243 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 244 | int perf_event__synthesize_modules(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 245 | perf_event__handler_t process, |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 246 | struct machine *machine); |
| 247 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 248 | int perf_event__process_comm(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 249 | union perf_event *event, |
| 250 | struct perf_sample *sample, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 251 | struct machine *machine); |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 252 | int perf_event__process_lost(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 253 | union perf_event *event, |
| 254 | struct perf_sample *sample, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 255 | struct machine *machine); |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 256 | int perf_event__process_mmap(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 257 | union perf_event *event, |
| 258 | struct perf_sample *sample, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 259 | struct machine *machine); |
Stephane Eranian | 5c5e854 | 2013-08-21 12:10:25 +0200 | [diff] [blame] | 260 | int perf_event__process_mmap2(struct perf_tool *tool, |
| 261 | union perf_event *event, |
| 262 | struct perf_sample *sample, |
| 263 | struct machine *machine); |
Arnaldo Carvalho de Melo | f62d3f0 | 2012-10-06 15:44:59 -0300 | [diff] [blame] | 264 | int perf_event__process_fork(struct perf_tool *tool, |
| 265 | union perf_event *event, |
| 266 | struct perf_sample *sample, |
| 267 | struct machine *machine); |
| 268 | int perf_event__process_exit(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 269 | union perf_event *event, |
| 270 | struct perf_sample *sample, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 271 | struct machine *machine); |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 272 | int perf_event__process(struct perf_tool *tool, |
Arnaldo Carvalho de Melo | d20deb6 | 2011-11-25 08:19:45 -0200 | [diff] [blame] | 273 | union perf_event *event, |
| 274 | struct perf_sample *sample, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 275 | struct machine *machine); |
Arnaldo Carvalho de Melo | 62daacb | 2009-11-27 16:29:22 -0200 | [diff] [blame] | 276 | |
Arnaldo Carvalho de Melo | 1ed091c | 2009-11-27 16:29:23 -0200 | [diff] [blame] | 277 | struct addr_location; |
Arnaldo Carvalho de Melo | 316c713 | 2013-11-05 15:32:36 -0300 | [diff] [blame] | 278 | |
| 279 | int perf_event__preprocess_sample(const union perf_event *event, |
Arnaldo Carvalho de Melo | 743eb86 | 2011-11-28 07:56:39 -0200 | [diff] [blame] | 280 | struct machine *machine, |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 281 | struct addr_location *al, |
Adrian Hunter | e44baa3 | 2013-08-08 14:32:25 +0300 | [diff] [blame] | 282 | struct perf_sample *sample); |
Arnaldo Carvalho de Melo | 1ed091c | 2009-11-27 16:29:23 -0200 | [diff] [blame] | 283 | |
Arnaldo Carvalho de Melo | 8115d60 | 2011-01-29 14:01:45 -0200 | [diff] [blame] | 284 | const char *perf_event__name(unsigned int id); |
Arnaldo Carvalho de Melo | c8446b9 | 2010-05-14 10:36:42 -0300 | [diff] [blame] | 285 | |
Adrian Hunter | b1cf6f6 | 2013-08-27 11:23:12 +0300 | [diff] [blame] | 286 | size_t perf_event__sample_event_size(const struct perf_sample *sample, u64 type, |
Jiri Olsa | 352ea45 | 2014-01-07 13:47:25 +0100 | [diff] [blame] | 287 | u64 read_format); |
Andrew Vagin | 74eec26 | 2011-11-28 12:03:31 +0300 | [diff] [blame] | 288 | int perf_event__synthesize_sample(union perf_event *event, u64 type, |
Jiri Olsa | 352ea45 | 2014-01-07 13:47:25 +0100 | [diff] [blame] | 289 | u64 read_format, |
Andrew Vagin | 74eec26 | 2011-11-28 12:03:31 +0300 | [diff] [blame] | 290 | const struct perf_sample *sample, |
| 291 | bool swapped); |
Arnaldo Carvalho de Melo | d0dd74e | 2011-01-21 13:46:41 -0200 | [diff] [blame] | 292 | |
Jiri Olsa | a18382b | 2014-01-07 13:47:20 +0100 | [diff] [blame] | 293 | int perf_event__synthesize_mmap_events(struct perf_tool *tool, |
| 294 | union perf_event *event, |
| 295 | pid_t pid, pid_t tgid, |
| 296 | perf_event__handler_t process, |
| 297 | struct machine *machine, |
| 298 | bool mmap_data); |
| 299 | |
Arnaldo Carvalho de Melo | 482ad89 | 2011-12-02 11:06:37 -0200 | [diff] [blame] | 300 | size_t perf_event__fprintf_comm(union perf_event *event, FILE *fp); |
| 301 | size_t perf_event__fprintf_mmap(union perf_event *event, FILE *fp); |
Stephane Eranian | 5c5e854 | 2013-08-21 12:10:25 +0200 | [diff] [blame] | 302 | size_t perf_event__fprintf_mmap2(union perf_event *event, FILE *fp); |
Arnaldo Carvalho de Melo | 482ad89 | 2011-12-02 11:06:37 -0200 | [diff] [blame] | 303 | size_t perf_event__fprintf_task(union perf_event *event, FILE *fp); |
| 304 | size_t perf_event__fprintf(union perf_event *event, FILE *fp); |
| 305 | |
Adrian Hunter | 29b596b | 2014-01-29 16:14:37 +0200 | [diff] [blame] | 306 | u64 kallsyms__get_function_start(const char *kallsyms_filename, |
| 307 | const char *symbol_name); |
| 308 | |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 309 | #endif /* __PERF_RECORD_H */ |