aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/perf.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/perf.h')
-rw-r--r--tools/perf/perf.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 2abeb20d0bf3..8cc4623afd6f 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -52,15 +52,15 @@
52#include <sys/types.h> 52#include <sys/types.h>
53#include <sys/syscall.h> 53#include <sys/syscall.h>
54 54
55#include "../../include/linux/perf_counter.h" 55#include "../../include/linux/perf_event.h"
56#include "util/types.h" 56#include "util/types.h"
57 57
58/* 58/*
59 * prctl(PR_TASK_PERF_COUNTERS_DISABLE) will (cheaply) disable all 59 * prctl(PR_TASK_PERF_EVENTS_DISABLE) will (cheaply) disable all
60 * counters in the current task. 60 * counters in the current task.
61 */ 61 */
62#define PR_TASK_PERF_COUNTERS_DISABLE 31 62#define PR_TASK_PERF_EVENTS_DISABLE 31
63#define PR_TASK_PERF_COUNTERS_ENABLE 32 63#define PR_TASK_PERF_EVENTS_ENABLE 32
64 64
65#ifndef NSEC_PER_SEC 65#ifndef NSEC_PER_SEC
66# define NSEC_PER_SEC 1000000000ULL 66# define NSEC_PER_SEC 1000000000ULL
@@ -90,12 +90,12 @@ static inline unsigned long long rdclock(void)
90 _min1 < _min2 ? _min1 : _min2; }) 90 _min1 < _min2 ? _min1 : _min2; })
91 91
92static inline int 92static inline int
93sys_perf_counter_open(struct perf_counter_attr *attr, 93sys_perf_event_open(struct perf_event_attr *attr,
94 pid_t pid, int cpu, int group_fd, 94 pid_t pid, int cpu, int group_fd,
95 unsigned long flags) 95 unsigned long flags)
96{ 96{
97 attr->size = sizeof(*attr); 97 attr->size = sizeof(*attr);
98 return syscall(__NR_perf_counter_open, attr, pid, cpu, 98 return syscall(__NR_perf_event_open, attr, pid, cpu,
99 group_fd, flags); 99 group_fd, flags);
100} 100}
101 101