aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.h
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2013-01-24 10:10:35 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-04-01 11:20:13 -0400
commit98a3b32c99ada4bca8aaf4f91efd96fc906dd5c4 (patch)
treef10d745caaecb65307a4aa71205a0c5836b186db /tools/perf/util/event.h
parent05484298cbfebbf8c8c55b000541a245bc286bec (diff)
perf tools: Add mem access sampling core support
This patch adds the sorting and histogram support functions to enable profiling of memory accesses. The following sorting orders are added: - symbol_daddr: data address symbol (or raw address) - dso_daddr: data address shared object - locked: access uses locked transaction - tlb : TLB access - mem : memory level of the access (L1, L2, L3, RAM, ...) - snoop: access snoop mode Signed-off-by: Stephane Eranian <eranian@google.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1359040242-8269-12-git-send-email-eranian@google.com [ committer note: changed to cope with fc5871ed, the move of methods to machine.[ch], and the rename of dsrc to data_src, to match the change made in the PERF_SAMPLE_DSRC in a previous patch. ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/event.h')
-rw-r--r--tools/perf/util/event.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index a97fbbe6b3b3..181389535c0c 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -91,6 +91,7 @@ struct perf_sample {
91 u64 weight; 91 u64 weight;
92 u32 cpu; 92 u32 cpu;
93 u32 raw_size; 93 u32 raw_size;
94 u64 data_src;
94 void *raw_data; 95 void *raw_data;
95 struct ip_callchain *callchain; 96 struct ip_callchain *callchain;
96 struct branch_stack *branch_stack; 97 struct branch_stack *branch_stack;
@@ -98,6 +99,13 @@ struct perf_sample {
98 struct stack_dump user_stack; 99 struct stack_dump user_stack;
99}; 100};
100 101
102#define PERF_MEM_DATA_SRC_NONE \
103 (PERF_MEM_S(OP, NA) |\
104 PERF_MEM_S(LVL, NA) |\
105 PERF_MEM_S(SNOOP, NA) |\
106 PERF_MEM_S(LOCK, NA) |\
107 PERF_MEM_S(TLB, NA))
108
101struct build_id_event { 109struct build_id_event {
102 struct perf_event_header header; 110 struct perf_event_header header;
103 pid_t pid; 111 pid_t pid;