Loading...
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _PERF_PERF_H
3#define _PERF_PERF_H
4
5#include <stdbool.h>
6
7#ifndef MAX_NR_CPUS
8#define MAX_NR_CPUS 2048
9#endif
10
11extern const char *input_name;
12extern bool perf_host, perf_guest;
13extern const char perf_version_string[];
14
15void pthread__unblock_sigwinch(void);
16
17enum perf_affinity {
18 PERF_AFFINITY_SYS = 0,
19 PERF_AFFINITY_NODE,
20 PERF_AFFINITY_CPU,
21 PERF_AFFINITY_MAX
22};
23
24extern int version_verbose;
25#endif
1#ifndef _PERF_PERF_H
2#define _PERF_PERF_H
3
4#include <time.h>
5#include <stdbool.h>
6#include <linux/types.h>
7#include <linux/perf_event.h>
8
9extern bool test_attr__enabled;
10void test_attr__init(void);
11void 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
17static 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}
24
25#define MAX_NR_CPUS 1024
26
27extern const char *input_name;
28extern bool perf_host, perf_guest;
29extern const char perf_version_string[];
30
31void pthread__unblock_sigwinch(void);
32
33#include "util/target.h"
34
35struct record_opts {
36 struct target target;
37 bool group;
38 bool inherit_stat;
39 bool no_buffering;
40 bool no_inherit;
41 bool no_inherit_set;
42 bool no_samples;
43 bool raw_samples;
44 bool sample_address;
45 bool sample_weight;
46 bool sample_time;
47 bool sample_time_set;
48 bool sample_cpu;
49 bool period;
50 bool running_time;
51 bool full_auxtrace;
52 bool auxtrace_snapshot_mode;
53 bool record_switch_events;
54 bool all_kernel;
55 bool all_user;
56 bool tail_synthesize;
57 bool overwrite;
58 bool ignore_missing_thread;
59 unsigned int freq;
60 unsigned int mmap_pages;
61 unsigned int auxtrace_mmap_pages;
62 unsigned int user_freq;
63 u64 branch_stack;
64 u64 sample_intr_regs;
65 u64 default_interval;
66 u64 user_interval;
67 size_t auxtrace_snapshot_size;
68 const char *auxtrace_snapshot_opts;
69 bool sample_transaction;
70 unsigned initial_delay;
71 bool use_clockid;
72 clockid_t clockid;
73 unsigned int proc_map_timeout;
74};
75
76struct option;
77extern const char * const *record_usage;
78extern struct option *record_options;
79#endif