]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - tools/perf/perf.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / tools / perf / perf.h
CommitLineData
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 10extern bool test_attr__enabled;
10213e2f 11void test_attr__ready(void);
82baa0eb
JO
12void test_attr__init(void);
13void 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
19static 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 29extern const char *input_name;
8035458f 30extern bool perf_host, perf_guest;
fbe96f29 31extern const char perf_version_string[];
a1645ce1 32
3af6e338
ACM
33void pthread__unblock_sigwinch(void);
34
12864b31 35#include "util/target.h"
bea03405 36
b4006796 37struct 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;
85c273d2 53 bool running_time;
9e0cc4fe 54 bool full_auxtrace;
d20031bb 55 bool auxtrace_snapshot_mode;
f3b3614a 56 bool record_namespaces;
b757bb09 57 bool record_switch_events;
85723885
JO
58 bool all_kernel;
59 bool all_user;
4ea648ae 60 bool tail_synthesize;
626a6b78 61 bool overwrite;
a359c17a 62 bool ignore_missing_thread;
0f82ebc4 63 unsigned int freq;
01c2d99b 64 unsigned int mmap_pages;
9e0cc4fe 65 unsigned int auxtrace_mmap_pages;
0f82ebc4 66 unsigned int user_freq;
a00dc319 67 u64 branch_stack;
bcc84ec6 68 u64 sample_intr_regs;
0f82ebc4
ACM
69 u64 default_interval;
70 u64 user_interval;
d20031bb
AH
71 size_t auxtrace_snapshot_size;
72 const char *auxtrace_snapshot_opts;
475eeab9 73 bool sample_transaction;
6619a53e 74 unsigned initial_delay;
814c8c38
PZ
75 bool use_clockid;
76 clockid_t clockid;
9d9cad76 77 unsigned int proc_map_timeout;
0f82ebc4
ACM
78};
79
e5b2c207
NK
80struct option;
81extern const char * const *record_usage;
82extern struct option *record_options;
6eda5838 83#endif