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 | #ifndef NSEC_PER_SEC |
18 | # define NSEC_PER_SEC 1000000000ULL | |
19 | #endif | |
70f7b4a7 DA |
20 | #ifndef NSEC_PER_USEC |
21 | # define NSEC_PER_USEC 1000ULL | |
22 | #endif | |
a92e7023 TG |
23 | |
24 | static inline unsigned long long rdclock(void) | |
25 | { | |
26 | struct timespec ts; | |
27 | ||
28 | clock_gettime(CLOCK_MONOTONIC, &ts); | |
29 | return ts.tv_sec * 1000000000ULL + ts.tv_nsec; | |
30 | } | |
6eda5838 | 31 | |
4d255766 | 32 | #define MAX_NR_CPUS 1024 |
6eda5838 | 33 | |
70cb4e96 | 34 | extern const char *input_name; |
8035458f | 35 | extern bool perf_host, perf_guest; |
fbe96f29 | 36 | extern const char perf_version_string[]; |
a1645ce1 | 37 | |
3af6e338 ACM |
38 | void pthread__unblock_sigwinch(void); |
39 | ||
12864b31 | 40 | #include "util/target.h" |
bea03405 | 41 | |
b4006796 | 42 | struct record_opts { |
602ad878 | 43 | struct target target; |
ed80f581 | 44 | bool group; |
0f82ebc4 | 45 | bool inherit_stat; |
509051ea | 46 | bool no_buffering; |
0f82ebc4 | 47 | bool no_inherit; |
69e7e5b0 | 48 | bool no_inherit_set; |
0f82ebc4 ACM |
49 | bool no_samples; |
50 | bool raw_samples; | |
51 | bool sample_address; | |
05484298 | 52 | bool sample_weight; |
0f82ebc4 | 53 | bool sample_time; |
3abebc55 | 54 | bool sample_time_set; |
c421e80b | 55 | bool callgraph_set; |
3e76ac78 | 56 | bool period; |
6a21c0b5 | 57 | bool sample_intr_regs; |
85c273d2 | 58 | bool running_time; |
9e0cc4fe | 59 | bool full_auxtrace; |
d20031bb | 60 | bool auxtrace_snapshot_mode; |
b757bb09 | 61 | bool record_switch_events; |
0f82ebc4 | 62 | unsigned int freq; |
01c2d99b | 63 | unsigned int mmap_pages; |
9e0cc4fe | 64 | unsigned int auxtrace_mmap_pages; |
0f82ebc4 | 65 | unsigned int user_freq; |
a00dc319 | 66 | u64 branch_stack; |
0f82ebc4 ACM |
67 | u64 default_interval; |
68 | u64 user_interval; | |
d20031bb AH |
69 | size_t auxtrace_snapshot_size; |
70 | const char *auxtrace_snapshot_opts; | |
475eeab9 | 71 | bool sample_transaction; |
6619a53e | 72 | unsigned initial_delay; |
814c8c38 PZ |
73 | bool use_clockid; |
74 | clockid_t clockid; | |
9d9cad76 | 75 | unsigned int proc_map_timeout; |
0f82ebc4 ACM |
76 | }; |
77 | ||
e5b2c207 NK |
78 | struct option; |
79 | extern const char * const *record_usage; | |
80 | extern struct option *record_options; | |
6eda5838 | 81 | #endif |