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