Commit 0c489c47 authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'master' of...

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/perfcounters into perfcounters/core
parents 8e818179 f3dfd265
...@@ -322,4 +322,4 @@ SYSCALL_SPU(epoll_create1) ...@@ -322,4 +322,4 @@ SYSCALL_SPU(epoll_create1)
SYSCALL_SPU(dup3) SYSCALL_SPU(dup3)
SYSCALL_SPU(pipe2) SYSCALL_SPU(pipe2)
SYSCALL(inotify_init1) SYSCALL(inotify_init1)
SYSCALL(perf_counter_open) SYSCALL_SPU(perf_counter_open)
...@@ -13,20 +13,8 @@ ...@@ -13,20 +13,8 @@
#ifndef _LINUX_PERF_COUNTER_H #ifndef _LINUX_PERF_COUNTER_H
#define _LINUX_PERF_COUNTER_H #define _LINUX_PERF_COUNTER_H
#include <asm/atomic.h> #include <linux/types.h>
#include <asm/ioctl.h> #include <linux/ioctl.h>
#ifdef CONFIG_PERF_COUNTERS
# include <asm/perf_counter.h>
#endif
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/rculist.h>
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
struct task_struct;
/* /*
* User-space ABI bits: * User-space ABI bits:
...@@ -78,12 +66,12 @@ enum perf_counter_record_type { ...@@ -78,12 +66,12 @@ enum perf_counter_record_type {
* Hardware event to monitor via a performance monitoring counter: * Hardware event to monitor via a performance monitoring counter:
*/ */
struct perf_counter_hw_event { struct perf_counter_hw_event {
s64 type; __s64 type;
u64 irq_period; __u64 irq_period;
u32 record_type; __u32 record_type;
u32 disabled : 1, /* off by default */ __u32 disabled : 1, /* off by default */
nmi : 1, /* NMI sampling */ nmi : 1, /* NMI sampling */
raw : 1, /* raw event type */ raw : 1, /* raw event type */
inherit : 1, /* children inherit it */ inherit : 1, /* children inherit it */
...@@ -95,7 +83,7 @@ struct perf_counter_hw_event { ...@@ -95,7 +83,7 @@ struct perf_counter_hw_event {
__reserved_1 : 23; __reserved_1 : 23;
u64 __reserved_2; __u64 __reserved_2;
}; };
/* /*
...@@ -104,10 +92,24 @@ struct perf_counter_hw_event { ...@@ -104,10 +92,24 @@ struct perf_counter_hw_event {
#define PERF_COUNTER_IOC_ENABLE _IO('$', 0) #define PERF_COUNTER_IOC_ENABLE _IO('$', 0)
#define PERF_COUNTER_IOC_DISABLE _IO('$', 1) #define PERF_COUNTER_IOC_DISABLE _IO('$', 1)
#ifdef __KERNEL__
/* /*
* Kernel-internal data types: * Kernel-internal data types and definitions:
*/ */
#ifdef CONFIG_PERF_COUNTERS
# include <asm/perf_counter.h>
#endif
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/rculist.h>
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
#include <asm/atomic.h>
struct task_struct;
/** /**
* struct hw_perf_counter - performance counter hardware details: * struct hw_perf_counter - performance counter hardware details:
*/ */
...@@ -293,4 +295,5 @@ static inline int perf_counter_task_disable(void) { return -EINVAL; } ...@@ -293,4 +295,5 @@ static inline int perf_counter_task_disable(void) { return -EINVAL; }
static inline int perf_counter_task_enable(void) { return -EINVAL; } static inline int perf_counter_task_enable(void) { return -EINVAL; }
#endif #endif
#endif /* __KERNEL__ */
#endif /* _LINUX_PERF_COUNTER_H */ #endif /* _LINUX_PERF_COUNTER_H */
...@@ -696,10 +696,7 @@ asmlinkage long sys_pipe(int __user *); ...@@ -696,10 +696,7 @@ asmlinkage long sys_pipe(int __user *);
int kernel_execve(const char *filename, char *const argv[], char *const envp[]); int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
asmlinkage int sys_perf_counter_open( asmlinkage long sys_perf_counter_open(
const struct perf_counter_hw_event __user *hw_event_uptr,
struct perf_counter_hw_event *hw_event_uptr __user, pid_t pid, int cpu, int group_fd);
pid_t pid,
int cpu,
int group_fd);
#endif #endif
...@@ -1690,9 +1690,9 @@ perf_counter_alloc(struct perf_counter_hw_event *hw_event, ...@@ -1690,9 +1690,9 @@ perf_counter_alloc(struct perf_counter_hw_event *hw_event,
* @cpu: target cpu * @cpu: target cpu
* @group_fd: group leader counter fd * @group_fd: group leader counter fd
*/ */
asmlinkage int SYSCALL_DEFINE4(perf_counter_open,
sys_perf_counter_open(struct perf_counter_hw_event *hw_event_uptr __user, const struct perf_counter_hw_event __user *, hw_event_uptr,
pid_t pid, int cpu, int group_fd) pid_t, pid, int, cpu, int, group_fd)
{ {
struct perf_counter *counter, *group_leader; struct perf_counter *counter, *group_leader;
struct perf_counter_hw_event hw_event; struct perf_counter_hw_event hw_event;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment