perf fixes
Subsystems (14)
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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.