Loading include/linux/perf_event.h +0 −6 Original line number Diff line number Diff line Loading @@ -458,11 +458,6 @@ struct perf_event { #endif /* CONFIG_PERF_EVENTS */ }; enum perf_event_context_type { task_context, cpu_context, }; /** * struct perf_event_context - event context structure * Loading @@ -470,7 +465,6 @@ enum perf_event_context_type { */ struct perf_event_context { struct pmu *pmu; enum perf_event_context_type type; /* * Protect the states of the events in the list, * nr_active, and the list: Loading kernel/events/core.c +13 −2 Original line number Diff line number Diff line Loading @@ -6816,7 +6816,6 @@ skip_type: __perf_event_init_context(&cpuctx->ctx); lockdep_set_class(&cpuctx->ctx.mutex, &cpuctx_mutex); lockdep_set_class(&cpuctx->ctx.lock, &cpuctx_lock); cpuctx->ctx.type = cpu_context; cpuctx->ctx.pmu = pmu; __perf_cpu_hrtimer_init(cpuctx, cpu); Loading Loading @@ -7464,7 +7463,19 @@ SYSCALL_DEFINE5(perf_event_open, * task or CPU context: */ if (move_group) { if (group_leader->ctx->type != ctx->type) /* * Make sure we're both on the same task, or both * per-cpu events. */ if (group_leader->ctx->task != ctx->task) goto err_context; /* * Make sure we're both events for the same CPU; * grouping events for different CPUs is broken; since * you can never concurrently schedule them anyhow. */ if (group_leader->cpu != event->cpu) goto err_context; } else { if (group_leader->ctx != ctx) Loading Loading
include/linux/perf_event.h +0 −6 Original line number Diff line number Diff line Loading @@ -458,11 +458,6 @@ struct perf_event { #endif /* CONFIG_PERF_EVENTS */ }; enum perf_event_context_type { task_context, cpu_context, }; /** * struct perf_event_context - event context structure * Loading @@ -470,7 +465,6 @@ enum perf_event_context_type { */ struct perf_event_context { struct pmu *pmu; enum perf_event_context_type type; /* * Protect the states of the events in the list, * nr_active, and the list: Loading
kernel/events/core.c +13 −2 Original line number Diff line number Diff line Loading @@ -6816,7 +6816,6 @@ skip_type: __perf_event_init_context(&cpuctx->ctx); lockdep_set_class(&cpuctx->ctx.mutex, &cpuctx_mutex); lockdep_set_class(&cpuctx->ctx.lock, &cpuctx_lock); cpuctx->ctx.type = cpu_context; cpuctx->ctx.pmu = pmu; __perf_cpu_hrtimer_init(cpuctx, cpu); Loading Loading @@ -7464,7 +7463,19 @@ SYSCALL_DEFINE5(perf_event_open, * task or CPU context: */ if (move_group) { if (group_leader->ctx->type != ctx->type) /* * Make sure we're both on the same task, or both * per-cpu events. */ if (group_leader->ctx->task != ctx->task) goto err_context; /* * Make sure we're both events for the same CPU; * grouping events for different CPUs is broken; since * you can never concurrently schedule them anyhow. */ if (group_leader->cpu != event->cpu) goto err_context; } else { if (group_leader->ctx != ctx) Loading