History

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar: "This tree includes four core perf fixes for misc bugs, three fixes to x86 PMU drivers, and two updates to old email addresses" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Do not send exit event twice perf/x86/intel: Fix INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_NA macro perf/x86/intel: Make L1D_PEND_MISS.FB_FULL not constrained on Haswell perf: Fix PERF_EVENT_IOC_PERIOD deadlock treewide: Remove old email address perf/x86: Fix LBR call stack save/restore perf: Update email address in MAINTAINERS perf/core: Robustify the perf_cgroup_from_task() RCU checks perf/core: Fix RCU problem with cgroup context switching code

Linus Torvalds committed 10 years ago

Commit 51825c82 parents 62ea1ec 4e93ad631 files · +98 −55Browse files

Unified · Split

31 files
  1. MAINTAINERS +1 −1
  2. arch/blackfin/kernel/perf_event.c +1 −1
  3. arch/sh/kernel/perf_event.c +1 −1
  4. arch/sparc/kernel/perf_event.c +1 −1
  5. arch/tile/kernel/perf_event.c +1 −1
  6. arch/x86/kernel/cpu/perf_event.c +1 −1
  7. arch/x86/kernel/cpu/perf_event.h +3 −2
  8. arch/x86/kernel/cpu/perf_event_intel.c +1 −1
  9. arch/x86/kernel/cpu/perf_event_intel_cqm.c +1 −1
  10. arch/x86/kernel/cpu/perf_event_intel_lbr.c +3 −1
  11. arch/x86/kernel/irq_work.c +1 −1
  12. include/asm-generic/tlb.h +1 −1
  13. include/linux/jump_label.h +1 −1
  14. include/linux/lockdep.h +1 −1
  15. include/linux/perf_event.h +4 −2
  16. include/linux/proportions.h +1 −1
  17. include/linux/uprobes.h +1 −1
  18. kernel/events/callchain.c +1 −1
  19. kernel/events/core.c +61 −23
  20. kernel/events/ring_buffer.c +1 −1
  21. kernel/events/uprobes.c +1 −1
  22. kernel/irq_work.c +1 −1
  23. kernel/jump_label.c +1 −1
  24. kernel/locking/lockdep.c +1 −1
  25. kernel/locking/lockdep_proc.c +1 −1
  26. kernel/sched/clock.c +1 −1
  27. kernel/sched/fair.c +1 −1
  28. kernel/trace/trace_event_perf.c +1 −1
  29. lib/btree.c +1 −1
  30. lib/proportions.c +1 −1
  31. mm/page-writeback.c +1 −1
MAINTAINERS+1−1
@@ -8286,7 +8286,7 @@ F: include/linux/delayacct.h · 8285 unmodified lines
82868286 F: kernel/delayacct.c
82878287
82888288 PERFORMANCE EVENTS SUBSYSTEM
8289−M: Peter Zijlstra <a.p.zijlstra@chello.nl>
8289+M: Peter Zijlstra <peterz@infradead.org>
82908290 M: Ingo Molnar <mingo@redhat.com>
82918291 M: Arnaldo Carvalho de Melo <acme@kernel.org>
82928292 L: linux-kernel@vger.kernel.org
arch/blackfin/kernel/perf_event.c+1−1
@@ -14,7 +14,7 @@ · 13 unmodified lines
1414 * Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
1515 * Copyright (C) 2009 Jaswinder Singh Rajput
1616 * Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
17− * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
17+ * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
1818 * Copyright (C) 2009 Intel Corporation, <markus.t.metzger@intel.com>
1919 *
2020 * ppc:
arch/sh/kernel/perf_event.c+1−1
@@ -10,7 +10,7 @@ · 9 unmodified lines
1010 * Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
1111 * Copyright (C) 2009 Jaswinder Singh Rajput
1212 * Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
13− * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
13+ * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
1414 * Copyright (C) 2009 Intel Corporation, <markus.t.metzger@intel.com>
1515 *
1616 * ppc:
arch/sparc/kernel/perf_event.c+1−1
@@ -9,7 +9,7 @@ · 8 unmodified lines
99 * Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
1010 * Copyright (C) 2009 Jaswinder Singh Rajput
1111 * Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
12− * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
12+ * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
1313 */
1414
1515 #include <linux/perf_event.h>
arch/tile/kernel/perf_event.c+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 * Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
2222 * Copyright (C) 2009 Jaswinder Singh Rajput
2323 * Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
24− * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
24+ * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
2525 * Copyright (C) 2009 Intel Corporation, <markus.t.metzger@intel.com>
2626 * Copyright (C) 2009 Google, Inc., Stephane Eranian
2727 */
arch/x86/kernel/cpu/perf_event.c+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 * Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
66 * Copyright (C) 2009 Jaswinder Singh Rajput
77 * Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
8− * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
8+ * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
99 * Copyright (C) 2009 Intel Corporation, <markus.t.metzger@intel.com>
1010 * Copyright (C) 2009 Google, Inc., Stephane Eranian
1111 *
arch/x86/kernel/cpu/perf_event.h+3−2
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 * Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
66 * Copyright (C) 2009 Jaswinder Singh Rajput
77 * Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
8− * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
8+ * Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
99 * Copyright (C) 2009 Intel Corporation, <markus.t.metzger@intel.com>
1010 * Copyright (C) 2009 Google, Inc., Stephane Eranian
1111 *
@@ -387,7 +387,7 @@ struct cpu_hw_events { · 375 unmodified lines
387387 /* Check flags and event code/umask, and set the HSW N/A flag */
388388 #define INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_NA(code, n) \
389389 __EVENT_CONSTRAINT(code, n, \
390− INTEL_ARCH_EVENT_MASK|INTEL_ARCH_EVENT_MASK, \
390+ INTEL_ARCH_EVENT_MASK|X86_ALL_EVENT_FLAGS, \
391391 HWEIGHT(n), 0, PERF_X86_EVENT_PEBS_NA_HSW)
392392
393393
@@ -627,6 +627,7 @@ struct x86_perf_task_context { · 233 unmodified lines
627627 u64 lbr_from[MAX_LBR_ENTRIES];
628628 u64 lbr_to[MAX_LBR_ENTRIES];
629629 u64 lbr_info[MAX_LBR_ENTRIES];
630+ int tos;
630631 int lbr_callstack_users;
631632 int lbr_stack_state;
632633 };
arch/x86/kernel/cpu/perf_event_intel.c+1−1
@@ -232,7 +232,7 @@ static struct event_constraint intel_hsw_event_constraints[] = { · 231 unmodified lines
232232 FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
233233 FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
234234 FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */
235− INTEL_EVENT_CONSTRAINT(0x48, 0x4), /* L1D_PEND_MISS.* */
235+ INTEL_UEVENT_CONSTRAINT(0x148, 0x4), /* L1D_PEND_MISS.PENDING */
236236 INTEL_UEVENT_CONSTRAINT(0x01c0, 0x2), /* INST_RETIRED.PREC_DIST */
237237 INTEL_EVENT_CONSTRAINT(0xcd, 0x8), /* MEM_TRANS_RETIRED.LOAD_LATENCY */
238238 /* CYCLE_ACTIVITY.CYCLES_L1D_PENDING */
arch/x86/kernel/cpu/perf_event_intel_cqm.c+1−1
@@ -298,7 +298,7 @@ static bool __match_event(struct perf_event *a, struct perf_event *b) · 297 unmodified lines
298298 static inline struct perf_cgroup *event_to_cgroup(struct perf_event *event)
299299 {
300300 if (event->attach_state & PERF_ATTACH_TASK)
301− return perf_cgroup_from_task(event->hw.target);
301+ return perf_cgroup_from_task(event->hw.target, event->ctx);
302302
303303 return event->cgrp;
304304 }
arch/x86/kernel/cpu/perf_event_intel_lbr.c+3−1
@@ -239,7 +239,7 @@ static void __intel_pmu_lbr_restore(struct x86_perf_task_context *task_ctx) · 238 unmodified lines
239239 }
240240
241241 mask = x86_pmu.lbr_nr - 1;
242− tos = intel_pmu_lbr_tos();
242+ tos = task_ctx->tos;
243243 for (i = 0; i < tos; i++) {
244244 lbr_idx = (tos - i) & mask;
245245 wrmsrl(x86_pmu.lbr_from + lbr_idx, task_ctx->lbr_from[i]);
@@ -247,6 +247,7 @@ static void __intel_pmu_lbr_restore(struct x86_perf_task_context *task_ctx) · 1 unmodified line
247247 if (x86_pmu.intel_cap.lbr_format == LBR_FORMAT_INFO)
248248 wrmsrl(MSR_LBR_INFO_0 + lbr_idx, task_ctx->lbr_info[i]);
249249 }
250+ wrmsrl(x86_pmu.lbr_tos, tos);
250251 task_ctx->lbr_stack_state = LBR_NONE;
251252 }
252253
@@ -270,6 +271,7 @@ static void __intel_pmu_lbr_save(struct x86_perf_task_context *task_ctx) · 17 unmodified lines
270271 if (x86_pmu.intel_cap.lbr_format == LBR_FORMAT_INFO)
271272 rdmsrl(MSR_LBR_INFO_0 + lbr_idx, task_ctx->lbr_info[i]);
272273 }
274+ task_ctx->tos = tos;
273275 task_ctx->lbr_stack_state = LBR_VALID;
274276 }
275277
arch/x86/kernel/irq_work.c+1−1
@@ -1,7 +1,7 @@
11 /*
22 * x86 specific code for irq_work
33 *
4− * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
4+ * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra
55 */
66
77 #include <linux/kernel.h>
include/asm-generic/tlb.h+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 * Copyright 2001 Red Hat, Inc.
66 * Based on code from mm/memory.c Copyright Linus Torvalds and others.
77 *
8− * Copyright 2011 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
8+ * Copyright 2011 Red Hat, Inc., Peter Zijlstra
99 *
1010 * This program is free software; you can redistribute it and/or
1111 * modify it under the terms of the GNU General Public License
include/linux/jump_label.h+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 * Jump label support
66 *
77 * Copyright (C) 2009-2012 Jason Baron <jbaron@redhat.com>
8− * Copyright (C) 2011-2012 Peter Zijlstra <pzijlstr@redhat.com>
8+ * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra
99 *
1010 * DEPRECATED API:
1111 *
include/linux/lockdep.h+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * Runtime locking correctness validator
33 *
44 * Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
5− * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
5+ * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
66 *
77 * see Documentation/locking/lockdep-design.txt for more details.
88 */
include/linux/perf_event.h+4−2
@@ -697,9 +697,11 @@ struct perf_cgroup { · 696 unmodified lines
697697 * if there is no cgroup event for the current CPU context.
698698 */
699699 static inline struct perf_cgroup *
700−perf_cgroup_from_task(struct task_struct *task)
700+perf_cgroup_from_task(struct task_struct *task, struct perf_event_context *ctx)
701701 {
702− return container_of(task_css(task, perf_event_cgrp_id),
702+ return container_of(task_css_check(task, perf_event_cgrp_id,
703+ ctx ? lockdep_is_held(&ctx->lock)
704+ : true),
703705 struct perf_cgroup, css);
704706 }
705707 #endif /* CONFIG_CGROUP_PERF */
include/linux/proportions.h+1−1
@@ -1,7 +1,7 @@
11 /*
22 * FLoating proportions
33 *
4− * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
4+ * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
55 *
66 * This file contains the public data structure and API definitions.
77 */
include/linux/uprobes.h+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 * Authors:
2222 * Srikar Dronamraju
2323 * Jim Keniston
24− * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
24+ * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra
2525 */
2626
2727 #include <linux/errno.h>
kernel/events/callchain.c+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 *
44 * Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de>
55 * Copyright (C) 2008-2011 Red Hat, Inc., Ingo Molnar
6− * Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
6+ * Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra
77 * Copyright � 2009 Paul Mackerras, IBM Corp. <paulus@au1.ibm.com>
88 *
99 * For licensing details see kernel-base/COPYING
kernel/events/core.c+61−23
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 *
44 * Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de>
55 * Copyright (C) 2008-2011 Red Hat, Inc., Ingo Molnar
6− * Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
6+ * Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra
77 * Copyright © 2009 Paul Mackerras, IBM Corp. <paulus@au1.ibm.com>
88 *
99 * For licensing details see kernel-base/COPYING
@@ -435,7 +435,7 @@ static inline void update_cgrp_time_from_event(struct perf_event *event) · 425 unmodified lines
435435 if (!is_cgroup_event(event))
436436 return;
437437
438− cgrp = perf_cgroup_from_task(current);
438+ cgrp = perf_cgroup_from_task(current, event->ctx);
439439 /*
440440 * Do not update time when cgroup is not active
441441 */
@@ -458,7 +458,7 @@ perf_cgroup_set_timestamp(struct task_struct *task, · 16 unmodified lines
458458 if (!task || !ctx->nr_cgroups)
459459 return;
460460
461− cgrp = perf_cgroup_from_task(task);
461+ cgrp = perf_cgroup_from_task(task, ctx);
462462 info = this_cpu_ptr(cgrp->info);
463463 info->timestamp = ctx->timestamp;
464464 }
@@ -489,7 +489,6 @@ static void perf_cgroup_switch(struct task_struct *task, int mode) · 24 unmodified lines
489489 * we reschedule only in the presence of cgroup
490490 * constrained events.
491491 */
492− rcu_read_lock();
493492
494493 list_for_each_entry_rcu(pmu, &pmus, entry) {
495494 cpuctx = this_cpu_ptr(pmu->pmu_cpu_context);
@@ -522,8 +521,10 @@ static void perf_cgroup_switch(struct task_struct *task, int mode) · 26 unmodified lines
522521 * set cgrp before ctxsw in to allow
523522 * event_filter_match() to not have to pass
524523 * task around
524+ * we pass the cpuctx->ctx to perf_cgroup_from_task()
525+ * because cgorup events are only per-cpu
525526 */
526− cpuctx->cgrp = perf_cgroup_from_task(task);
527+ cpuctx->cgrp = perf_cgroup_from_task(task, &cpuctx->ctx);
527528 cpu_ctx_sched_in(cpuctx, EVENT_ALL, task);
528529 }
529530 perf_pmu_enable(cpuctx->ctx.pmu);
@@ -531,8 +532,6 @@ static void perf_cgroup_switch(struct task_struct *task, int mode) · 1 unmodified line
531532 }
532533 }
533534
534− rcu_read_unlock();
535−
536535 local_irq_restore(flags);
537536 }
538537
@@ -542,17 +541,20 @@ static inline void perf_cgroup_sched_out(struct task_struct *task, · 3 unmodified lines
542541 struct perf_cgroup *cgrp1;
543542 struct perf_cgroup *cgrp2 = NULL;
544543
544+ rcu_read_lock();
545545 /*
546546 * we come here when we know perf_cgroup_events > 0
547+ * we do not need to pass the ctx here because we know
548+ * we are holding the rcu lock
547549 */
548− cgrp1 = perf_cgroup_from_task(task);
550+ cgrp1 = perf_cgroup_from_task(task, NULL);
549551
550552 /*
551553 * next is NULL when called from perf_event_enable_on_exec()
552554 * that will systematically cause a cgroup_switch()
553555 */
554556 if (next)
555− cgrp2 = perf_cgroup_from_task(next);
557+ cgrp2 = perf_cgroup_from_task(next, NULL);
556558
557559 /*
558560 * only schedule out current cgroup events if we know
@@ -561,6 +563,8 @@ static inline void perf_cgroup_sched_out(struct task_struct *task, · 2 unmodified lines
561563 */
562564 if (cgrp1 != cgrp2)
563565 perf_cgroup_switch(task, PERF_CGROUP_SWOUT);
566+
567+ rcu_read_unlock();
564568 }
565569
566570 static inline void perf_cgroup_sched_in(struct task_struct *prev,
@@ -569,13 +573,16 @@ static inline void perf_cgroup_sched_in(struct task_struct *prev, · 2 unmodified lines
569573 struct perf_cgroup *cgrp1;
570574 struct perf_cgroup *cgrp2 = NULL;
571575
576+ rcu_read_lock();
572577 /*
573578 * we come here when we know perf_cgroup_events > 0
579+ * we do not need to pass the ctx here because we know
580+ * we are holding the rcu lock
574581 */
575− cgrp1 = perf_cgroup_from_task(task);
582+ cgrp1 = perf_cgroup_from_task(task, NULL);
576583
577584 /* prev can never be NULL */
578− cgrp2 = perf_cgroup_from_task(prev);
585+ cgrp2 = perf_cgroup_from_task(prev, NULL);
579586
580587 /*
581588 * only need to schedule in cgroup events if we are changing
@@ -584,6 +591,8 @@ static inline void perf_cgroup_sched_in(struct task_struct *prev, · 2 unmodified lines
584591 */
585592 if (cgrp1 != cgrp2)
586593 perf_cgroup_switch(task, PERF_CGROUP_SWIN);
594+
595+ rcu_read_unlock();
587596 }
588597
589598 static inline int perf_cgroup_connect(int fd, struct perf_event *event,
@@ -4216,7 +4225,14 @@ retry: · 3626 unmodified lines
42164225 goto retry;
42174226 }
42184227
4219− __perf_event_period(&pe);
4228+ if (event->attr.freq) {
4229+ event->attr.sample_freq = value;
4230+ } else {
4231+ event->attr.sample_period = value;
4232+ event->hw.sample_period = value;
4233+ }
4234+
4235+ local64_set(&event->hw.period_left, 0);
42204236 raw_spin_unlock_irq(&ctx->lock);
42214237
42224238 return 0;
@@ -5666,6 +5682,17 @@ perf_event_aux_ctx(struct perf_event_context *ctx, · 1443 unmodified lines
56665682 }
56675683 }
56685684
5685+static void
5686+perf_event_aux_task_ctx(perf_event_aux_output_cb output, void *data,
5687+ struct perf_event_context *task_ctx)
5688+{
5689+ rcu_read_lock();
5690+ preempt_disable();
5691+ perf_event_aux_ctx(task_ctx, output, data);
5692+ preempt_enable();
5693+ rcu_read_unlock();
5694+}
5695+
56695696 static void
56705697 perf_event_aux(perf_event_aux_output_cb output, void *data,
56715698 struct perf_event_context *task_ctx)
@@ -5675,14 +5702,23 @@ perf_event_aux(perf_event_aux_output_cb output, void *data, · 3 unmodified lines
56755702 struct pmu *pmu;
56765703 int ctxn;
56775704
5705+ /*
5706+ * If we have task_ctx != NULL we only notify
5707+ * the task context itself. The task_ctx is set
5708+ * only for EXIT events before releasing task
5709+ * context.
5710+ */
5711+ if (task_ctx) {
5712+ perf_event_aux_task_ctx(output, data, task_ctx);
5713+ return;
5714+ }
5715+
56785716 rcu_read_lock();
56795717 list_for_each_entry_rcu(pmu, &pmus, entry) {
56805718 cpuctx = get_cpu_ptr(pmu->pmu_cpu_context);
56815719 if (cpuctx->unique_pmu != pmu)
56825720 goto next;
56835721 perf_event_aux_ctx(&cpuctx->ctx, output, data);
5684− if (task_ctx)
5685− goto next;
56865722 ctxn = pmu->task_ctx_nr;
56875723 if (ctxn < 0)
56885724 goto next;
@@ -5692,12 +5728,6 @@ perf_event_aux(perf_event_aux_output_cb output, void *data, · 3 unmodified lines
56925728 next:
56935729 put_cpu_ptr(pmu->pmu_cpu_context);
56945730 }
5695−
5696− if (task_ctx) {
5697− preempt_disable();
5698− perf_event_aux_ctx(task_ctx, output, data);
5699− preempt_enable();
5700− }
57015731 rcu_read_unlock();
57025732 }
57035733
@@ -8787,10 +8817,8 @@ static void perf_event_exit_task_context(struct task_struct *child, int ctxn) · 3083 unmodified lines
87878817 struct perf_event_context *child_ctx, *clone_ctx = NULL;
87888818 unsigned long flags;
87898819
8790− if (likely(!child->perf_event_ctxp[ctxn])) {
8791− perf_event_task(child, NULL, 0);
8820+ if (likely(!child->perf_event_ctxp[ctxn]))
87928821 return;
8793− }
87948822
87958823 local_irq_save(flags);
87968824 /*
@@ -8874,6 +8902,14 @@ void perf_event_exit_task(struct task_struct *child) · 77 unmodified lines
88748902
88758903 for_each_task_context_nr(ctxn)
88768904 perf_event_exit_task_context(child, ctxn);
8905+
8906+ /*
8907+ * The perf_event_exit_task_context calls perf_event_task
8908+ * with child's task_ctx, which generates EXIT events for
8909+ * child contexts and sets child->perf_event_ctxp[] to NULL.
8910+ * At this point we need to send EXIT events to cpu contexts.
8911+ */
8912+ perf_event_task(child, NULL, 0);
88778913 }
88788914
88798915 static void perf_free_event(struct perf_event *event,
@@ -9452,7 +9488,9 @@ static void perf_cgroup_css_free(struct cgroup_subsys_state *css) · 572 unmodified lines
94529488 static int __perf_cgroup_move(void *info)
94539489 {
94549490 struct task_struct *task = info;
9491+ rcu_read_lock();
94559492 perf_cgroup_switch(task, PERF_CGROUP_SWOUT | PERF_CGROUP_SWIN);
9493+ rcu_read_unlock();
94569494 return 0;
94579495 }
94589496
kernel/events/ring_buffer.c+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 *
44 * Copyright (C) 2008 Thomas Gleixner <tglx@linutronix.de>
55 * Copyright (C) 2008-2011 Red Hat, Inc., Ingo Molnar
6− * Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
6+ * Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra
77 * Copyright © 2009 Paul Mackerras, IBM Corp. <paulus@au1.ibm.com>
88 *
99 * For licensing details see kernel-base/COPYING
kernel/events/uprobes.c+1−1
@@ -19,7 +19,7 @@ · 18 unmodified lines
1919 * Authors:
2020 * Srikar Dronamraju
2121 * Jim Keniston
22− * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
22+ * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra
2323 */
2424
2525 #include <linux/kernel.h>
kernel/irq_work.c+1−1
@@ -1,5 +1,5 @@
11 /*
2− * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
2+ * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra
33 *
44 * Provides a framework for enqueueing and running callbacks from hardirq
55 * context. The enqueueing is NMI-safe.
kernel/jump_label.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * jump label support
33 *
44 * Copyright (C) 2009 Jason Baron <jbaron@redhat.com>
5− * Copyright (C) 2011 Peter Zijlstra <pzijlstr@redhat.com>
5+ * Copyright (C) 2011 Peter Zijlstra
66 *
77 */
88 #include <linux/memory.h>
kernel/locking/lockdep.c+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 * Started by Ingo Molnar:
77 *
88 * Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
9− * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
9+ * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
1010 *
1111 * this code maps all the lock dependencies as they occur in a live kernel
1212 * and will warn about the following classes of locking bugs:
kernel/locking/lockdep_proc.c+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 * Started by Ingo Molnar:
77 *
88 * Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
9− * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
9+ * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
1010 *
1111 * Code for /proc/lockdep and /proc/lockdep_stats:
1212 *
kernel/sched/clock.c+1−1
@@ -1,7 +1,7 @@
11 /*
22 * sched_clock for unstable cpu clocks
33 *
4− * Copyright (C) 2008 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
4+ * Copyright (C) 2008 Red Hat, Inc., Peter Zijlstra
55 *
66 * Updates and enhancements:
77 * Copyright (C) 2008 Red Hat, Inc. Steven Rostedt <srostedt@redhat.com>
kernel/sched/fair.c+1−1
@@ -17,7 +17,7 @@ · 16 unmodified lines
1717 * Copyright (C) 2007, Thomas Gleixner <tglx@linutronix.de>
1818 *
1919 * Adaptive scheduling granularity, math enhancements by Peter Zijlstra
20− * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
20+ * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
2121 */
2222
2323 #include <linux/latencytop.h>
kernel/trace/trace_event_perf.c+1−1
@@ -1,7 +1,7 @@
11 /*
22 * trace event based perf event profiling/tracing
33 *
4− * Copyright (C) 2009 Red Hat Inc, Peter Zijlstra <pzijlstr@redhat.com>
4+ * Copyright (C) 2009 Red Hat Inc, Peter Zijlstra
55 * Copyright (C) 2009-2010 Frederic Weisbecker <fweisbec@gmail.com>
66 */
77
lib/btree.c+1−1
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 *
66 * Copyright (c) 2007-2008 Joern Engel <joern@logfs.org>
77 * Bits and pieces stolen from Peter Zijlstra's code, which is
8− * Copyright 2007, Red Hat Inc. Peter Zijlstra <pzijlstr@redhat.com>
8+ * Copyright 2007, Red Hat Inc. Peter Zijlstra
99 * GPLv2
1010 *
1111 * see http://programming.kicks-ass.net/kernel-patches/vma_lookup/btree.patch
lib/proportions.c+1−1
@@ -1,7 +1,7 @@
11 /*
22 * Floating proportions
33 *
4− * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
4+ * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
55 *
66 * Description:
77 *
mm/page-writeback.c+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22 * mm/page-writeback.c
33 *
44 * Copyright (C) 2002, Linus Torvalds.
5− * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <pzijlstr@redhat.com>
5+ * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
66 *
77 * Contains functions related to writing back dirty pages at the
88 * address_space level.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t