| .. | .. |
|---|
| 2 | 2 | #ifndef _PERF_PERF_H |
|---|
| 3 | 3 | #define _PERF_PERF_H |
|---|
| 4 | 4 | |
|---|
| 5 | | -#include <time.h> |
|---|
| 6 | 5 | #include <stdbool.h> |
|---|
| 7 | | -#include <linux/types.h> |
|---|
| 8 | | -#include <linux/stddef.h> |
|---|
| 9 | | -#include <linux/perf_event.h> |
|---|
| 10 | | - |
|---|
| 11 | | -extern bool test_attr__enabled; |
|---|
| 12 | | -void test_attr__ready(void); |
|---|
| 13 | | -void test_attr__init(void); |
|---|
| 14 | | -void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu, |
|---|
| 15 | | - int fd, int group_fd, unsigned long flags); |
|---|
| 16 | | - |
|---|
| 17 | | -#define HAVE_ATTR_TEST |
|---|
| 18 | | -#include "perf-sys.h" |
|---|
| 19 | | - |
|---|
| 20 | | -static inline unsigned long long rdclock(void) |
|---|
| 21 | | -{ |
|---|
| 22 | | - struct timespec ts; |
|---|
| 23 | | - |
|---|
| 24 | | - clock_gettime(CLOCK_MONOTONIC, &ts); |
|---|
| 25 | | - return ts.tv_sec * 1000000000ULL + ts.tv_nsec; |
|---|
| 26 | | -} |
|---|
| 27 | 6 | |
|---|
| 28 | 7 | #ifndef MAX_NR_CPUS |
|---|
| 29 | 8 | #define MAX_NR_CPUS 2048 |
|---|
| .. | .. |
|---|
| 35 | 14 | |
|---|
| 36 | 15 | void pthread__unblock_sigwinch(void); |
|---|
| 37 | 16 | |
|---|
| 38 | | -#include "util/target.h" |
|---|
| 39 | | - |
|---|
| 40 | | -struct record_opts { |
|---|
| 41 | | - struct target target; |
|---|
| 42 | | - bool group; |
|---|
| 43 | | - bool inherit_stat; |
|---|
| 44 | | - bool no_buffering; |
|---|
| 45 | | - bool no_inherit; |
|---|
| 46 | | - bool no_inherit_set; |
|---|
| 47 | | - bool no_samples; |
|---|
| 48 | | - bool raw_samples; |
|---|
| 49 | | - bool sample_address; |
|---|
| 50 | | - bool sample_phys_addr; |
|---|
| 51 | | - bool sample_weight; |
|---|
| 52 | | - bool sample_time; |
|---|
| 53 | | - bool sample_time_set; |
|---|
| 54 | | - bool sample_cpu; |
|---|
| 55 | | - bool period; |
|---|
| 56 | | - bool period_set; |
|---|
| 57 | | - bool running_time; |
|---|
| 58 | | - bool full_auxtrace; |
|---|
| 59 | | - bool auxtrace_snapshot_mode; |
|---|
| 60 | | - bool record_namespaces; |
|---|
| 61 | | - bool record_switch_events; |
|---|
| 62 | | - bool all_kernel; |
|---|
| 63 | | - bool all_user; |
|---|
| 64 | | - bool tail_synthesize; |
|---|
| 65 | | - bool overwrite; |
|---|
| 66 | | - bool ignore_missing_thread; |
|---|
| 67 | | - bool strict_freq; |
|---|
| 68 | | - bool sample_id; |
|---|
| 69 | | - unsigned int freq; |
|---|
| 70 | | - unsigned int mmap_pages; |
|---|
| 71 | | - unsigned int auxtrace_mmap_pages; |
|---|
| 72 | | - unsigned int user_freq; |
|---|
| 73 | | - u64 branch_stack; |
|---|
| 74 | | - u64 sample_intr_regs; |
|---|
| 75 | | - u64 sample_user_regs; |
|---|
| 76 | | - u64 default_interval; |
|---|
| 77 | | - u64 user_interval; |
|---|
| 78 | | - size_t auxtrace_snapshot_size; |
|---|
| 79 | | - const char *auxtrace_snapshot_opts; |
|---|
| 80 | | - bool sample_transaction; |
|---|
| 81 | | - unsigned initial_delay; |
|---|
| 82 | | - bool use_clockid; |
|---|
| 83 | | - clockid_t clockid; |
|---|
| 84 | | - unsigned int proc_map_timeout; |
|---|
| 17 | +enum perf_affinity { |
|---|
| 18 | + PERF_AFFINITY_SYS = 0, |
|---|
| 19 | + PERF_AFFINITY_NODE, |
|---|
| 20 | + PERF_AFFINITY_CPU, |
|---|
| 21 | + PERF_AFFINITY_MAX |
|---|
| 85 | 22 | }; |
|---|
| 86 | 23 | |
|---|
| 87 | | -struct option; |
|---|
| 88 | | -extern const char * const *record_usage; |
|---|
| 89 | | -extern struct option *record_options; |
|---|
| 90 | 24 | extern int version_verbose; |
|---|
| 91 | | - |
|---|
| 92 | | -int record__parse_freq(const struct option *opt, const char *str, int unset); |
|---|
| 93 | 25 | #endif |
|---|