Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
[linux/fpc-iii.git] / tools / perf / perf.h
blob4a5827fff7993d2bbe87666af51aa939f6f9dd1d
1 #ifndef _PERF_PERF_H
2 #define _PERF_PERF_H
4 #include <time.h>
5 #include <stdbool.h>
6 #include <linux/types.h>
7 #include <linux/perf_event.h>
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);
14 #define HAVE_ATTR_TEST
15 #include "perf-sys.h"
17 #ifndef NSEC_PER_SEC
18 # define NSEC_PER_SEC 1000000000ULL
19 #endif
20 #ifndef NSEC_PER_USEC
21 # define NSEC_PER_USEC 1000ULL
22 #endif
24 static inline unsigned long long rdclock(void)
26 struct timespec ts;
28 clock_gettime(CLOCK_MONOTONIC, &ts);
29 return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
32 #define MAX_NR_CPUS 1024
34 extern const char *input_name;
35 extern bool perf_host, perf_guest;
36 extern const char perf_version_string[];
38 void pthread__unblock_sigwinch(void);
40 #include "util/target.h"
42 struct record_opts {
43 struct target target;
44 bool group;
45 bool inherit_stat;
46 bool no_buffering;
47 bool no_inherit;
48 bool no_inherit_set;
49 bool no_samples;
50 bool raw_samples;
51 bool sample_address;
52 bool sample_weight;
53 bool sample_time;
54 bool period;
55 bool sample_intr_regs;
56 bool running_time;
57 bool full_auxtrace;
58 bool auxtrace_snapshot_mode;
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 default_interval;
65 u64 user_interval;
66 size_t auxtrace_snapshot_size;
67 const char *auxtrace_snapshot_opts;
68 bool sample_transaction;
69 unsigned initial_delay;
70 bool use_clockid;
71 clockid_t clockid;
72 unsigned int proc_map_timeout;
75 struct option;
76 extern const char * const *record_usage;
77 extern struct option *record_options;
78 #endif