aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/perf_event.h
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2015-05-06 15:33:51 -0400
committerIngo Molnar <mingo@kernel.org>2015-06-07 10:08:54 -0400
commit9c964efa4330a58520783effe9847f15126fef1f (patch)
treece0ab6b36e279c9038806fc4bd05d6cd3cf46af1 /arch/x86/kernel/cpu/perf_event.h
parent3569c0d7c5440d6fd06b10e1ef9614588a049bc7 (diff)
perf/x86/intel: Drain the PEBS buffer during context switches
Flush the PEBS buffer during context switches if PEBS interrupt threshold is larger than one. This allows perf to supply TID for sample outputs. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Signed-off-by: Kan Liang <kan.liang@intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: acme@infradead.org Cc: eranian@google.com Link: http://lkml.kernel.org/r/1430940834-8964-6-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.h')
-rw-r--r--arch/x86/kernel/cpu/perf_event.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h
index a73dfc97226b..74089bcb6d74 100644
--- a/arch/x86/kernel/cpu/perf_event.h
+++ b/arch/x86/kernel/cpu/perf_event.h
@@ -92,9 +92,11 @@ struct amd_nb {
92/* 92/*
93 * Flags PEBS can handle without an PMI. 93 * Flags PEBS can handle without an PMI.
94 * 94 *
95 * TID can only be handled by flushing at context switch.
96 *
95 */ 97 */
96#define PEBS_FREERUNNING_FLAGS \ 98#define PEBS_FREERUNNING_FLAGS \
97 (PERF_SAMPLE_IP | PERF_SAMPLE_ADDR | \ 99 (PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_ADDR | \
98 PERF_SAMPLE_ID | PERF_SAMPLE_CPU | PERF_SAMPLE_STREAM_ID | \ 100 PERF_SAMPLE_ID | PERF_SAMPLE_CPU | PERF_SAMPLE_STREAM_ID | \
99 PERF_SAMPLE_DATA_SRC | PERF_SAMPLE_IDENTIFIER | \ 101 PERF_SAMPLE_DATA_SRC | PERF_SAMPLE_IDENTIFIER | \
100 PERF_SAMPLE_TRANSACTION) 102 PERF_SAMPLE_TRANSACTION)
@@ -877,6 +879,8 @@ void intel_pmu_pebs_enable_all(void);
877 879
878void intel_pmu_pebs_disable_all(void); 880void intel_pmu_pebs_disable_all(void);
879 881
882void intel_pmu_pebs_sched_task(struct perf_event_context *ctx, bool sched_in);
883
880void intel_ds_init(void); 884void intel_ds_init(void);
881 885
882void intel_pmu_lbr_sched_task(struct perf_event_context *ctx, bool sched_in); 886void intel_pmu_lbr_sched_task(struct perf_event_context *ctx, bool sched_in);