Skip to contentSkip to conversation

perf fixes

GIT PULL Ingo Molnar 1 participant 1 message Dec 8, 2015

Subsystems (14)
lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest perf-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-for-linus

# HEAD: 4e93ad601a4308d4a67673c81556580817d56940 perf: Do not send exit event twice

This tree includes 4 core perf fixes for misc bugs, 3 fixes to x86 PMU drivers, and 2 updates to old email addresses.

Thanks,

Ingo

------------------>
Andi Kleen (1):
perf/x86: Fix LBR call stack save/restore

Jiri Olsa (2):
perf/x86/intel: Fix INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_NA macro
perf: Do not send exit event twice

Peter Zijlstra (3):
perf: Update email address in MAINTAINERS
treewide: Remove old email address
perf: Fix PERF_EVENT_IOC_PERIOD deadlock

Stephane Eranian (2):
perf/core: Fix RCU problem with cgroup context switching code perf/core: Robustify the perf_cgroup_from_task() RCU checks

Yuanfang Chen (1):
perf/x86/intel: Make L1D_PEND_MISS.FB_FULL not constrained on Haswell

 MAINTAINERS                                |  2 +-
 arch/blackfin/kernel/perf_event.c          |  2 +-
 arch/sh/kernel/perf_event.c                |  2 +-
 arch/sparc/kernel/perf_event.c             |  2 +-
 arch/tile/kernel/perf_event.c              |  2 +-
 arch/x86/kernel/cpu/perf_event.c           |  2 +-
 arch/x86/kernel/cpu/perf_event.h           |  5 +-
 arch/x86/kernel/cpu/perf_event_intel.c     |  2 +-
 arch/x86/kernel/cpu/perf_event_intel_cqm.c |  2 +-
 arch/x86/kernel/cpu/perf_event_intel_lbr.c |  4 +-
 arch/x86/kernel/irq_work.c                 |  2 +-
 include/asm-generic/tlb.h                  |  2 +-
 include/linux/jump_label.h                 |  2 +-
 include/linux/lockdep.h                    |  2 +-
 include/linux/perf_event.h                 |  6 ++-
 include/linux/proportions.h                |  2 +-
 include/linux/uprobes.h                    |  2 +-
 kernel/events/callchain.c                  |  2 +-
 kernel/events/core.c                       | 84 ++++++++++++++++++++++--------
 kernel/events/ring_buffer.c                |  2 +-
 kernel/events/uprobes.c                    |  2 +-
 kernel/irq_work.c                          |  2 +-
 kernel/jump_label.c                        |  2 +-
 kernel/locking/lockdep.c                   |  2 +-
 kernel/locking/lockdep_proc.c              |  2 +-
 kernel/sched/clock.c                       |  2 +-
 kernel/sched/fair.c                        |  2 +-
 kernel/trace/trace_event_perf.c            |  2 +-
 lib/btree.c                                |  2 +-
 lib/proportions.c                          |  2 +-
 mm/page-writeback.c                        |  2 +-
 31 files changed, 98 insertions(+), 55 deletions(-)
MAINTAINERS +1 -1
index 050d0e77a2cf..a45fe3538d2f 100644
@@ -8284,7 +8284,7 @@ F:	include/linux/delayacct.h
 F:	kernel/delayacct.c
 
 PERFORMANCE EVENTS SUBSYSTEM
-M:	Peter Zijlstra <[email protected]>
+M:	Peter Zijlstra <[email protected]>
 M:	Ingo Molnar <[email protected]>
 M:	Arnaldo Carvalho de Melo <[email protected]>
 L:	[email protected]
arch/blackfin/kernel/perf_event.c +1 -1
index 1e9c8b0bf486..170d786807c4 100644
@@ -14,7 +14,7 @@
  *  Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
  *  Copyright (C) 2009 Jaswinder Singh Rajput
  *  Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
- *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
  *  Copyright (C) 2009 Intel Corporation, <[email protected]>
  *
  * ppc:
arch/sh/kernel/perf_event.c +1 -1
index 7cfd7f153966..4dca18347ee9 100644
@@ -10,7 +10,7 @@
  *  Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
  *  Copyright (C) 2009 Jaswinder Singh Rajput
  *  Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
- *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
  *  Copyright (C) 2009 Intel Corporation, <[email protected]>
  *
  * ppc:
arch/sparc/kernel/perf_event.c +1 -1
index b0da5aedb336..3091267c5cc3 100644
@@ -9,7 +9,7 @@
  *  Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
  *  Copyright (C) 2009 Jaswinder Singh Rajput
  *  Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
- *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
  */
 
 #include <linux/perf_event.h>
arch/tile/kernel/perf_event.c +1 -1
index bb509cee3b59..8767060d70fb 100644
@@ -21,7 +21,7 @@
  *  Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
  *  Copyright (C) 2009 Jaswinder Singh Rajput
  *  Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
- *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
  *  Copyright (C) 2009 Intel Corporation, <[email protected]>
  *  Copyright (C) 2009 Google, Inc., Stephane Eranian
  */
arch/x86/kernel/cpu/perf_event.c +1 -1
index 4562cf070c27..2bf79d7c97df 100644
@@ -5,7 +5,7 @@
  *  Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
  *  Copyright (C) 2009 Jaswinder Singh Rajput
  *  Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
- *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
  *  Copyright (C) 2009 Intel Corporation, <[email protected]>
  *  Copyright (C) 2009 Google, Inc., Stephane Eranian
  *
arch/x86/kernel/cpu/perf_event.h +3 -2
index 499f533dd3cc..d0e35ebb2adb 100644
@@ -5,7 +5,7 @@
  *  Copyright (C) 2008-2009 Red Hat, Inc., Ingo Molnar
  *  Copyright (C) 2009 Jaswinder Singh Rajput
  *  Copyright (C) 2009 Advanced Micro Devices, Inc., Robert Richter
- *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2008-2009 Red Hat, Inc., Peter Zijlstra
  *  Copyright (C) 2009 Intel Corporation, <[email protected]>
  *  Copyright (C) 2009 Google, Inc., Stephane Eranian
  *
@@ -387,7 +387,7 @@ struct cpu_hw_events {
 /* Check flags and event code/umask, and set the HSW N/A flag */
 #define INTEL_FLAGS_UEVENT_CONSTRAINT_DATALA_NA(code, n) \
 	__EVENT_CONSTRAINT(code, n, 			\
-			  INTEL_ARCH_EVENT_MASK|INTEL_ARCH_EVENT_MASK, \
+			  INTEL_ARCH_EVENT_MASK|X86_ALL_EVENT_FLAGS, \
 			  HWEIGHT(n), 0, PERF_X86_EVENT_PEBS_NA_HSW)
 
 
@@ -627,6 +627,7 @@ struct x86_perf_task_context {
 	u64 lbr_from[MAX_LBR_ENTRIES];
 	u64 lbr_to[MAX_LBR_ENTRIES];
 	u64 lbr_info[MAX_LBR_ENTRIES];
+	int tos;
 	int lbr_callstack_users;
 	int lbr_stack_state;
 };
arch/x86/kernel/cpu/perf_event_intel.c +1 -1
index f63360be2238..e2a430021e46 100644
@@ -232,7 +232,7 @@ static struct event_constraint intel_hsw_event_constraints[] = {
 	FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
 	FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
 	FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */
-	INTEL_EVENT_CONSTRAINT(0x48, 0x4), /* L1D_PEND_MISS.* */
+	INTEL_UEVENT_CONSTRAINT(0x148, 0x4),	/* L1D_PEND_MISS.PENDING */
 	INTEL_UEVENT_CONSTRAINT(0x01c0, 0x2), /* INST_RETIRED.PREC_DIST */
 	INTEL_EVENT_CONSTRAINT(0xcd, 0x8), /* MEM_TRANS_RETIRED.LOAD_LATENCY */
 	/* CYCLE_ACTIVITY.CYCLES_L1D_PENDING */
arch/x86/kernel/cpu/perf_event_intel_cqm.c +1 -1
index 377e8f8ed391..a316ca96f1b6 100644
@@ -298,7 +298,7 @@ static bool __match_event(struct perf_event *a, struct perf_event *b)
 static inline struct perf_cgroup *event_to_cgroup(struct perf_event *event)
 {
 	if (event->attach_state & PERF_ATTACH_TASK)
-		return perf_cgroup_from_task(event->hw.target);
+		return perf_cgroup_from_task(event->hw.target, event->ctx);
 
 	return event->cgrp;
 }
arch/x86/kernel/cpu/perf_event_intel_lbr.c +3 -1
index bfd0b717e944..659f01e165d5 100644
@@ -239,7 +239,7 @@ static void __intel_pmu_lbr_restore(struct x86_perf_task_context *task_ctx)
 	}
 
 	mask = x86_pmu.lbr_nr - 1;
-	tos = intel_pmu_lbr_tos();
+	tos = task_ctx->tos;
 	for (i = 0; i < tos; i++) {
 		lbr_idx = (tos - i) & mask;
 		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)
 		if (x86_pmu.intel_cap.lbr_format == LBR_FORMAT_INFO)
 			wrmsrl(MSR_LBR_INFO_0 + lbr_idx, task_ctx->lbr_info[i]);
 	}
+	wrmsrl(x86_pmu.lbr_tos, tos);
 	task_ctx->lbr_stack_state = LBR_NONE;
 }
 
@@ -270,6 +271,7 @@ static void __intel_pmu_lbr_save(struct x86_perf_task_context *task_ctx)
 		if (x86_pmu.intel_cap.lbr_format == LBR_FORMAT_INFO)
 			rdmsrl(MSR_LBR_INFO_0 + lbr_idx, task_ctx->lbr_info[i]);
 	}
+	task_ctx->tos = tos;
 	task_ctx->lbr_stack_state = LBR_VALID;
 }
 
arch/x86/kernel/irq_work.c +1 -1
index dc5fa6a1e8d6..3512ba607361 100644
@@ -1,7 +1,7 @@
 /*
  * x86 specific code for irq_work
  *
- * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra
  */
 
 #include <linux/kernel.h>
include/asm-generic/tlb.h +1 -1
index db284bff29dc..9dbb739cafa0 100644
@@ -5,7 +5,7 @@
  * Copyright 2001 Red Hat, Inc.
  * Based on code from mm/memory.c Copyright Linus Torvalds and others.
  *
- * Copyright 2011 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ * Copyright 2011 Red Hat, Inc., Peter Zijlstra
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
include/linux/jump_label.h +1 -1
index 8dde55974f18..0536524bb9eb 100644
@@ -5,7 +5,7 @@
  * Jump label support
  *
  * Copyright (C) 2009-2012 Jason Baron <[email protected]>
- * Copyright (C) 2011-2012 Peter Zijlstra <[email protected]>
+ * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra
  *
  * DEPRECATED API:
  *
include/linux/lockdep.h +1 -1
index 70400dc7660f..c57e424d914b 100644
@@ -2,7 +2,7 @@
  * Runtime locking correctness validator
  *
  *  Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <[email protected]>
- *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
  *
  * see Documentation/locking/lockdep-design.txt for more details.
  */
include/linux/perf_event.h +4 -2
index d841d33bcdc9..f9828a48f16a 100644
@@ -697,9 +697,11 @@ struct perf_cgroup {
  * if there is no cgroup event for the current CPU context.
  */
 static inline struct perf_cgroup *
-perf_cgroup_from_task(struct task_struct *task)
+perf_cgroup_from_task(struct task_struct *task, struct perf_event_context *ctx)
 {
-	return container_of(task_css(task, perf_event_cgrp_id),
+	return container_of(task_css_check(task, perf_event_cgrp_id,
+					   ctx ? lockdep_is_held(&ctx->lock)
+					       : true),
 			    struct perf_cgroup, css);
 }
 #endif /* CONFIG_CGROUP_PERF */
include/linux/proportions.h +1 -1
index 5440f64d2942..21221338ad18 100644
@@ -1,7 +1,7 @@
 /*
  * FLoating proportions
  *
- *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
  *
  * This file contains the public data structure and API definitions.
  */
include/linux/uprobes.h +1 -1
index 0bdc72f36905..4a29c75b146e 100644
@@ -21,7 +21,7 @@
  * Authors:
  *	Srikar Dronamraju
  *	Jim Keniston
- * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra
  */
 
 #include <linux/errno.h>
kernel/events/callchain.c +1 -1
index d659487254d5..9c418002b8c1 100644
@@ -3,7 +3,7 @@
  *
  *  Copyright (C) 2008 Thomas Gleixner <[email protected]>
  *  Copyright (C) 2008-2011 Red Hat, Inc., Ingo Molnar
- *  Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra
  *  Copyright  �  2009 Paul Mackerras, IBM Corp. <[email protected]>
  *
  * For licensing details see kernel-base/COPYING
kernel/events/core.c +61 -23

209 lines not on this page · raw message

kernel/events/ring_buffer.c +1 -1
index b5d1ea79c595..adfdc0536117 100644
@@ -3,7 +3,7 @@
  *
  *  Copyright (C) 2008 Thomas Gleixner <[email protected]>
  *  Copyright (C) 2008-2011 Red Hat, Inc., Ingo Molnar
- *  Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2008-2011 Red Hat, Inc., Peter Zijlstra
  *  Copyright  ©  2009 Paul Mackerras, IBM Corp. <[email protected]>
  *
  * For licensing details see kernel-base/COPYING
kernel/events/uprobes.c +1 -1
index 4e5e9798aa0c..7dad84913abf 100644
@@ -19,7 +19,7 @@
  * Authors:
  *	Srikar Dronamraju
  *	Jim Keniston
- * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ * Copyright (C) 2011-2012 Red Hat, Inc., Peter Zijlstra
  */
 
 #include <linux/kernel.h>
kernel/irq_work.c +1 -1
index cbf9fb899d92..bcf107ce0854 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ * Copyright (C) 2010 Red Hat, Inc., Peter Zijlstra
  *
  * Provides a framework for enqueueing and running callbacks from hardirq
  * context. The enqueueing is NMI-safe.
kernel/jump_label.c +1 -1
index f7dd15d537f9..05254eeb4b4e 100644
@@ -2,7 +2,7 @@
  * jump label support
  *
  * Copyright (C) 2009 Jason Baron <[email protected]>
- * Copyright (C) 2011 Peter Zijlstra <[email protected]>
+ * Copyright (C) 2011 Peter Zijlstra
  *
  */
 #include <linux/memory.h>
kernel/locking/lockdep.c +1 -1
index deae3907ac1e..60ace56618f6 100644
@@ -6,7 +6,7 @@
  * Started by Ingo Molnar:
  *
  *  Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <[email protected]>
- *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
  *
  * this code maps all the lock dependencies as they occur in a live kernel
  * and will warn about the following classes of locking bugs:
kernel/locking/lockdep_proc.c +1 -1
index d83d798bef95..dbb61a302548 100644
@@ -6,7 +6,7 @@
  * Started by Ingo Molnar:
  *
  *  Copyright (C) 2006,2007 Red Hat, Inc., Ingo Molnar <[email protected]>
- *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
  *
  * Code for /proc/lockdep and /proc/lockdep_stats:
  *
kernel/sched/clock.c +1 -1
index c0a205101c23..caf4041f5b0a 100644
@@ -1,7 +1,7 @@
 /*
  * sched_clock for unstable cpu clocks
  *
- *  Copyright (C) 2008 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2008 Red Hat, Inc., Peter Zijlstra
  *
  *  Updates and enhancements:
  *    Copyright (C) 2008 Red Hat, Inc. Steven Rostedt <[email protected]>
kernel/sched/fair.c +1 -1
index f04fda8f669c..90e26b11deaa 100644
@@ -17,7 +17,7 @@
  *  Copyright (C) 2007, Thomas Gleixner <[email protected]>
  *
  *  Adaptive scheduling granularity, math enhancements by Peter Zijlstra
- *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
  */
 
 #include <linux/latencytop.h>
kernel/trace/trace_event_perf.c +1 -1
index abfc903e741e..cc9f7a9319be 100644
@@ -1,7 +1,7 @@
 /*
  * trace event based perf event profiling/tracing
  *
- * Copyright (C) 2009 Red Hat Inc, Peter Zijlstra <[email protected]>
+ * Copyright (C) 2009 Red Hat Inc, Peter Zijlstra
  * Copyright (C) 2009-2010 Frederic Weisbecker <[email protected]>
  */
 
lib/btree.c +1 -1
index 4264871ea1a0..f93a945274af 100644
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 2007-2008 Joern Engel <[email protected]>
  * Bits and pieces stolen from Peter Zijlstra's code, which is
- * Copyright 2007, Red Hat Inc. Peter Zijlstra <[email protected]>
+ * Copyright 2007, Red Hat Inc. Peter Zijlstra
  * GPLv2
  *
  * see http://programming.kicks-ass.net/kernel-patches/vma_lookup/btree.patch
lib/proportions.c +1 -1
index 6f724298f67a..efa54f259ea9 100644
@@ -1,7 +1,7 @@
 /*
  * Floating proportions
  *
- *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ *  Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
  *
  * Description:
  *
mm/page-writeback.c +1 -1
index 3e4d65445fa7..d15d88c8efa1 100644
@@ -2,7 +2,7 @@
  * mm/page-writeback.c
  *
  * Copyright (C) 2002, Linus Torvalds.
- * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra <[email protected]>
+ * Copyright (C) 2007 Red Hat, Inc., Peter Zijlstra
  *
  * Contains functions related to writing back dirty pages at the
  * address_space level.