diff options
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r-- | include/linux/perf_counter.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index f794c69b34c9..3586df840f69 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -28,6 +28,7 @@ enum perf_event_types { | |||
28 | PERF_TYPE_HARDWARE = 0, | 28 | PERF_TYPE_HARDWARE = 0, |
29 | PERF_TYPE_SOFTWARE = 1, | 29 | PERF_TYPE_SOFTWARE = 1, |
30 | PERF_TYPE_TRACEPOINT = 2, | 30 | PERF_TYPE_TRACEPOINT = 2, |
31 | PERF_TYPE_HW_CACHE = 3, | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * available TYPE space, raw is the max value. | 34 | * available TYPE space, raw is the max value. |
@@ -56,6 +57,39 @@ enum attr_ids { | |||
56 | }; | 57 | }; |
57 | 58 | ||
58 | /* | 59 | /* |
60 | * Generalized hardware cache counters: | ||
61 | * | ||
62 | * { L1-D, L1-I, L2, LLC, ITLB, DTLB, BPU } x | ||
63 | * { read, write, prefetch } x | ||
64 | * { accesses, misses } | ||
65 | */ | ||
66 | enum hw_cache_id { | ||
67 | PERF_COUNT_HW_CACHE_L1D, | ||
68 | PERF_COUNT_HW_CACHE_L1I, | ||
69 | PERF_COUNT_HW_CACHE_L2, | ||
70 | PERF_COUNT_HW_CACHE_DTLB, | ||
71 | PERF_COUNT_HW_CACHE_ITLB, | ||
72 | PERF_COUNT_HW_CACHE_BPU, | ||
73 | |||
74 | PERF_COUNT_HW_CACHE_MAX, | ||
75 | }; | ||
76 | |||
77 | enum hw_cache_op_id { | ||
78 | PERF_COUNT_HW_CACHE_OP_READ, | ||
79 | PERF_COUNT_HW_CACHE_OP_WRITE, | ||
80 | PERF_COUNT_HW_CACHE_OP_PREFETCH, | ||
81 | |||
82 | PERF_COUNT_HW_CACHE_OP_MAX, | ||
83 | }; | ||
84 | |||
85 | enum hw_cache_op_result_id { | ||
86 | PERF_COUNT_HW_CACHE_RESULT_ACCESS, | ||
87 | PERF_COUNT_HW_CACHE_RESULT_MISS, | ||
88 | |||
89 | PERF_COUNT_HW_CACHE_RESULT_MAX, | ||
90 | }; | ||
91 | |||
92 | /* | ||
59 | * Special "software" counters provided by the kernel, even if the hardware | 93 | * Special "software" counters provided by the kernel, even if the hardware |
60 | * does not support performance counters. These counters measure various | 94 | * does not support performance counters. These counters measure various |
61 | * physical and sw events of the kernel (and allow the profiling of them as | 95 | * physical and sw events of the kernel (and allow the profiling of them as |