Loading include/linux/perf_counter.h +9 −3 Original line number Diff line number Diff line Loading @@ -69,9 +69,10 @@ struct perf_counter_hw_event { __s64 type; __u64 irq_period; __u32 record_type; __u64 record_type; __u64 read_format; __u32 disabled : 1, /* off by default */ __u64 disabled : 1, /* off by default */ nmi : 1, /* NMI sampling */ raw : 1, /* raw event type */ inherit : 1, /* children inherit it */ Loading @@ -80,10 +81,15 @@ struct perf_counter_hw_event { exclude_user : 1, /* don't count user */ exclude_kernel : 1, /* ditto kernel */ exclude_hv : 1, /* ditto hypervisor */ exclude_idle : 1, /* don't count when idle */ __reserved_1 : 23; __reserved_1 : 55; __u32 extra_config_len; __u32 __reserved_4; __u64 __reserved_2; __u64 __reserved_3; }; /* Loading include/linux/syscalls.h +1 −1 Original line number Diff line number Diff line Loading @@ -698,5 +698,5 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]); asmlinkage long sys_perf_counter_open( 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, unsigned long flags); #endif kernel/perf_counter.c +7 −3 Original line number Diff line number Diff line Loading @@ -1683,16 +1683,16 @@ perf_counter_alloc(struct perf_counter_hw_event *hw_event, } /** * sys_perf_task_open - open a performance counter, associate it to a task/cpu * sys_perf_counter_open - open a performance counter, associate it to a task/cpu * * @hw_event_uptr: event type attributes for monitoring/sampling * @pid: target pid * @cpu: target cpu * @group_fd: group leader counter fd */ SYSCALL_DEFINE4(perf_counter_open, SYSCALL_DEFINE5(perf_counter_open, 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, unsigned long, flags) { struct perf_counter *counter, *group_leader; struct perf_counter_hw_event hw_event; Loading @@ -1703,6 +1703,10 @@ SYSCALL_DEFINE4(perf_counter_open, int fput_needed2 = 0; int ret; /* for future expandability... */ if (flags) return -EINVAL; if (copy_from_user(&hw_event, hw_event_uptr, sizeof(hw_event)) != 0) return -EFAULT; Loading Loading
include/linux/perf_counter.h +9 −3 Original line number Diff line number Diff line Loading @@ -69,9 +69,10 @@ struct perf_counter_hw_event { __s64 type; __u64 irq_period; __u32 record_type; __u64 record_type; __u64 read_format; __u32 disabled : 1, /* off by default */ __u64 disabled : 1, /* off by default */ nmi : 1, /* NMI sampling */ raw : 1, /* raw event type */ inherit : 1, /* children inherit it */ Loading @@ -80,10 +81,15 @@ struct perf_counter_hw_event { exclude_user : 1, /* don't count user */ exclude_kernel : 1, /* ditto kernel */ exclude_hv : 1, /* ditto hypervisor */ exclude_idle : 1, /* don't count when idle */ __reserved_1 : 23; __reserved_1 : 55; __u32 extra_config_len; __u32 __reserved_4; __u64 __reserved_2; __u64 __reserved_3; }; /* Loading
include/linux/syscalls.h +1 −1 Original line number Diff line number Diff line Loading @@ -698,5 +698,5 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]); asmlinkage long sys_perf_counter_open( 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, unsigned long flags); #endif
kernel/perf_counter.c +7 −3 Original line number Diff line number Diff line Loading @@ -1683,16 +1683,16 @@ perf_counter_alloc(struct perf_counter_hw_event *hw_event, } /** * sys_perf_task_open - open a performance counter, associate it to a task/cpu * sys_perf_counter_open - open a performance counter, associate it to a task/cpu * * @hw_event_uptr: event type attributes for monitoring/sampling * @pid: target pid * @cpu: target cpu * @group_fd: group leader counter fd */ SYSCALL_DEFINE4(perf_counter_open, SYSCALL_DEFINE5(perf_counter_open, 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, unsigned long, flags) { struct perf_counter *counter, *group_leader; struct perf_counter_hw_event hw_event; Loading @@ -1703,6 +1703,10 @@ SYSCALL_DEFINE4(perf_counter_open, int fput_needed2 = 0; int ret; /* for future expandability... */ if (flags) return -EINVAL; if (copy_from_user(&hw_event, hw_event_uptr, sizeof(hw_event)) != 0) return -EFAULT; Loading