Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / tools / perf / perf.h
CommitLineData
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
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
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
24static 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 34extern const char *input_name;
8035458f 35extern bool perf_host, perf_guest;
fbe96f29 36extern const char perf_version_string[];
a1645ce1 37
3af6e338
ACM
38void pthread__unblock_sigwinch(void);
39
12864b31 40#include "util/target.h"
bea03405 41
b4006796 42struct 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;
85c273d2 57 bool running_time;
9e0cc4fe 58 bool full_auxtrace;
d20031bb 59 bool auxtrace_snapshot_mode;
b757bb09 60 bool record_switch_events;
85723885
JO
61 bool all_kernel;
62 bool all_user;
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