diff options
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r-- | tools/perf/perf.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h index 3afa39ac1d40..89e3355ab173 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h | |||
@@ -173,7 +173,6 @@ sys_perf_event_open(struct perf_event_attr *attr, | |||
173 | pid_t pid, int cpu, int group_fd, | 173 | pid_t pid, int cpu, int group_fd, |
174 | unsigned long flags) | 174 | unsigned long flags) |
175 | { | 175 | { |
176 | attr->size = sizeof(*attr); | ||
177 | return syscall(__NR_perf_event_open, attr, pid, cpu, | 176 | return syscall(__NR_perf_event_open, attr, pid, cpu, |
178 | group_fd, flags); | 177 | group_fd, flags); |
179 | } | 178 | } |
@@ -186,14 +185,32 @@ struct ip_callchain { | |||
186 | u64 ips[0]; | 185 | u64 ips[0]; |
187 | }; | 186 | }; |
188 | 187 | ||
188 | struct branch_flags { | ||
189 | u64 mispred:1; | ||
190 | u64 predicted:1; | ||
191 | u64 reserved:62; | ||
192 | }; | ||
193 | |||
194 | struct branch_entry { | ||
195 | u64 from; | ||
196 | u64 to; | ||
197 | struct branch_flags flags; | ||
198 | }; | ||
199 | |||
200 | struct branch_stack { | ||
201 | u64 nr; | ||
202 | struct branch_entry entries[0]; | ||
203 | }; | ||
204 | |||
189 | extern bool perf_host, perf_guest; | 205 | extern bool perf_host, perf_guest; |
190 | extern const char perf_version_string[]; | 206 | extern const char perf_version_string[]; |
191 | 207 | ||
192 | void pthread__unblock_sigwinch(void); | 208 | void pthread__unblock_sigwinch(void); |
193 | 209 | ||
194 | struct perf_record_opts { | 210 | struct perf_record_opts { |
195 | pid_t target_pid; | 211 | const char *target_pid; |
196 | pid_t target_tid; | 212 | const char *target_tid; |
213 | uid_t uid; | ||
197 | bool call_graph; | 214 | bool call_graph; |
198 | bool group; | 215 | bool group; |
199 | bool inherit_stat; | 216 | bool inherit_stat; |
@@ -204,13 +221,14 @@ struct perf_record_opts { | |||
204 | bool raw_samples; | 221 | bool raw_samples; |
205 | bool sample_address; | 222 | bool sample_address; |
206 | bool sample_time; | 223 | bool sample_time; |
207 | bool sample_id_all_avail; | 224 | bool sample_id_all_missing; |
208 | bool exclude_guest_missing; | 225 | bool exclude_guest_missing; |
209 | bool system_wide; | 226 | bool system_wide; |
210 | bool period; | 227 | bool period; |
211 | unsigned int freq; | 228 | unsigned int freq; |
212 | unsigned int mmap_pages; | 229 | unsigned int mmap_pages; |
213 | unsigned int user_freq; | 230 | unsigned int user_freq; |
231 | int branch_stack; | ||
214 | u64 default_interval; | 232 | u64 default_interval; |
215 | u64 user_interval; | 233 | u64 user_interval; |
216 | const char *cpu_list; | 234 | const char *cpu_list; |