]>
Commit | Line | Data |
---|---|---|
6eda5838 TG |
1 | #ifndef _PERF_PERF_H |
2 | #define _PERF_PERF_H | |
3 | ||
1a482f38 | 4 | #include <time.h> |
82baa0eb | 5 | #include <stdbool.h> |
d944c4ee | 6 | #include <linux/types.h> |
d2709c7c | 7 | #include <linux/perf_event.h> |
1a482f38 | 8 | |
82baa0eb JO |
9 | extern bool test_attr__enabled; |
10 | void test_attr__init(void); | |
11 | void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu, | |
12 | int fd, int group_fd, unsigned long flags); | |
13 | ||
14 | #define HAVE_ATTR_TEST | |
15 | #include "perf-sys.h" | |
16 | ||
a92e7023 TG |
17 | static inline unsigned long long rdclock(void) |
18 | { | |
19 | struct timespec ts; | |
20 | ||
21 | clock_gettime(CLOCK_MONOTONIC, &ts); | |
22 | return ts.tv_sec * 1000000000ULL + ts.tv_nsec; | |
23 | } | |
6eda5838 | 24 | |
4d255766 | 25 | #define MAX_NR_CPUS 1024 |
6eda5838 | 26 | |
70cb4e96 | 27 | extern const char *input_name; |
8035458f | 28 | extern bool perf_host, perf_guest; |
fbe96f29 | 29 | extern const char perf_version_string[]; |
a1645ce1 | 30 | |
3af6e338 ACM |
31 | void pthread__unblock_sigwinch(void); |
32 | ||
12864b31 | 33 | #include "util/target.h" |
bea03405 | 34 | |
b4006796 | 35 | struct record_opts { |
602ad878 | 36 | struct target target; |
ed80f581 | 37 | bool group; |
0f82ebc4 | 38 | bool inherit_stat; |
509051ea | 39 | bool no_buffering; |
0f82ebc4 | 40 | bool no_inherit; |
69e7e5b0 | 41 | bool no_inherit_set; |
0f82ebc4 ACM |
42 | bool no_samples; |
43 | bool raw_samples; | |
44 | bool sample_address; | |
05484298 | 45 | bool sample_weight; |
0f82ebc4 | 46 | bool sample_time; |
3abebc55 | 47 | bool sample_time_set; |
b6f35ed7 | 48 | bool sample_cpu; |
3e76ac78 | 49 | bool period; |
85c273d2 | 50 | bool running_time; |
9e0cc4fe | 51 | bool full_auxtrace; |
d20031bb | 52 | bool auxtrace_snapshot_mode; |
b757bb09 | 53 | bool record_switch_events; |
85723885 JO |
54 | bool all_kernel; |
55 | bool all_user; | |
4ea648ae | 56 | bool tail_synthesize; |
626a6b78 | 57 | bool overwrite; |
0f82ebc4 | 58 | unsigned int freq; |
01c2d99b | 59 | unsigned int mmap_pages; |
9e0cc4fe | 60 | unsigned int auxtrace_mmap_pages; |
0f82ebc4 | 61 | unsigned int user_freq; |
a00dc319 | 62 | u64 branch_stack; |
bcc84ec6 | 63 | u64 sample_intr_regs; |
0f82ebc4 ACM |
64 | u64 default_interval; |
65 | u64 user_interval; | |
d20031bb AH |
66 | size_t auxtrace_snapshot_size; |
67 | const char *auxtrace_snapshot_opts; | |
475eeab9 | 68 | bool sample_transaction; |
6619a53e | 69 | unsigned initial_delay; |
814c8c38 PZ |
70 | bool use_clockid; |
71 | clockid_t clockid; | |
9d9cad76 | 72 | unsigned int proc_map_timeout; |
0f82ebc4 ACM |
73 | }; |
74 | ||
e5b2c207 NK |
75 | struct option; |
76 | extern const char * const *record_usage; | |
77 | extern struct option *record_options; | |
6eda5838 | 78 | #endif |