aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2014-08-11 15:27:12 -0400
committerIngo Molnar <mingo@kernel.org>2014-08-13 01:51:15 -0400
commit770eee1fd38c70a009b321f5dbe64358f42511fd (patch)
tree6d8f605feca5cff7e73edc4770545a48901d48ac /include/linux
parentf3908b8cfb65ab6e78ac84df3b864eb22d5b6d9e (diff)
perf/x86: Fix data source encoding issues for load latency/precise store
This patch fixes issues introuduce by Andi's previous patch 'Revamp PEBS' series. This patch fixes the following: - precise_store_data_hsw() encode the mem op type whenever we can - precise_store_data_hsw set the default data source correctly - 0 is not a valid init value for data source. Define PERF_MEM_NA as the default value This bug was actually introduced by commit 722e76e60f2775c21b087ff12c5e678cf0ebcaaf Author: Stephane Eranian <eranian@google.com> Date: Thu May 15 17:56:44 2014 +0200 fix Haswell precise store data source encoding Signed-off-by: Stephane Eranian <eranian@google.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1407785233-32193-4-git-send-email-eranian@google.com Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: ak@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/perf_event.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index ef5b62bdb103..f0a1036b1911 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -608,6 +608,13 @@ struct perf_sample_data {
608 u64 txn; 608 u64 txn;
609}; 609};
610 610
611/* default value for data source */
612#define PERF_MEM_NA (PERF_MEM_S(OP, NA) |\
613 PERF_MEM_S(LVL, NA) |\
614 PERF_MEM_S(SNOOP, NA) |\
615 PERF_MEM_S(LOCK, NA) |\
616 PERF_MEM_S(TLB, NA))
617
611static inline void perf_sample_data_init(struct perf_sample_data *data, 618static inline void perf_sample_data_init(struct perf_sample_data *data,
612 u64 addr, u64 period) 619 u64 addr, u64 period)
613{ 620{
@@ -620,7 +627,7 @@ static inline void perf_sample_data_init(struct perf_sample_data *data,
620 data->regs_user.regs = NULL; 627 data->regs_user.regs = NULL;
621 data->stack_user_size = 0; 628 data->stack_user_size = 0;
622 data->weight = 0; 629 data->weight = 0;
623 data->data_src.val = 0; 630 data->data_src.val = PERF_MEM_NA;
624 data->txn = 0; 631 data->txn = 0;
625} 632}
626 633