diff options
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r-- | include/linux/perf_counter.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 6e133954e2e4..1b3118a1023a 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -120,6 +120,8 @@ enum perf_counter_sample_format { | |||
120 | PERF_SAMPLE_ID = 1U << 6, | 120 | PERF_SAMPLE_ID = 1U << 6, |
121 | PERF_SAMPLE_CPU = 1U << 7, | 121 | PERF_SAMPLE_CPU = 1U << 7, |
122 | PERF_SAMPLE_PERIOD = 1U << 8, | 122 | PERF_SAMPLE_PERIOD = 1U << 8, |
123 | |||
124 | PERF_SAMPLE_MAX = 1U << 9, /* non-ABI */ | ||
123 | }; | 125 | }; |
124 | 126 | ||
125 | /* | 127 | /* |
@@ -131,17 +133,26 @@ enum perf_counter_read_format { | |||
131 | PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0, | 133 | PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0, |
132 | PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, | 134 | PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, |
133 | PERF_FORMAT_ID = 1U << 2, | 135 | PERF_FORMAT_ID = 1U << 2, |
136 | |||
137 | PERF_FORMAT_MAX = 1U << 3, /* non-ABI */ | ||
134 | }; | 138 | }; |
135 | 139 | ||
140 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ | ||
141 | |||
136 | /* | 142 | /* |
137 | * Hardware event to monitor via a performance monitoring counter: | 143 | * Hardware event to monitor via a performance monitoring counter: |
138 | */ | 144 | */ |
139 | struct perf_counter_attr { | 145 | struct perf_counter_attr { |
146 | |||
140 | /* | 147 | /* |
141 | * Major type: hardware/software/tracepoint/etc. | 148 | * Major type: hardware/software/tracepoint/etc. |
142 | */ | 149 | */ |
143 | __u32 type; | 150 | __u32 type; |
144 | __u32 __reserved_1; | 151 | |
152 | /* | ||
153 | * Size of the attr structure, for fwd/bwd compat. | ||
154 | */ | ||
155 | __u32 size; | ||
145 | 156 | ||
146 | /* | 157 | /* |
147 | * Type specific configuration information. | 158 | * Type specific configuration information. |
@@ -168,12 +179,12 @@ struct perf_counter_attr { | |||
168 | comm : 1, /* include comm data */ | 179 | comm : 1, /* include comm data */ |
169 | freq : 1, /* use freq, not period */ | 180 | freq : 1, /* use freq, not period */ |
170 | 181 | ||
171 | __reserved_2 : 53; | 182 | __reserved_1 : 53; |
172 | 183 | ||
173 | __u32 wakeup_events; /* wakeup every n events */ | 184 | __u32 wakeup_events; /* wakeup every n events */ |
174 | __u32 __reserved_3; | 185 | __u32 __reserved_2; |
175 | 186 | ||
176 | __u64 __reserved_4; | 187 | __u64 __reserved_3; |
177 | }; | 188 | }; |
178 | 189 | ||
179 | /* | 190 | /* |
@@ -621,7 +632,8 @@ extern int perf_counter_overflow(struct perf_counter *counter, int nmi, | |||
621 | static inline int is_software_counter(struct perf_counter *counter) | 632 | static inline int is_software_counter(struct perf_counter *counter) |
622 | { | 633 | { |
623 | return (counter->attr.type != PERF_TYPE_RAW) && | 634 | return (counter->attr.type != PERF_TYPE_RAW) && |
624 | (counter->attr.type != PERF_TYPE_HARDWARE); | 635 | (counter->attr.type != PERF_TYPE_HARDWARE) && |
636 | (counter->attr.type != PERF_TYPE_HW_CACHE); | ||
625 | } | 637 | } |
626 | 638 | ||
627 | extern void perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); | 639 | extern void perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); |