aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_counter.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-04-06 05:45:08 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-07 04:48:59 -0400
commit0c593b3411341e3a05a61f5527df36ab02bd11e8 (patch)
tree3f9add4fc4636e8d5154afc9a4cc26e705482624 /include/linux/perf_counter.h
parent79f146415623fe74f39af67c0f6adc208939a410 (diff)
perf_counter: comment the perf_event_type stuff
Describe the event format. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> LKML-Reference: <20090406094518.211174347@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r--include/linux/perf_counter.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index ef4dcbff75ab..81220188d058 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -208,6 +208,20 @@ struct perf_event_header {
208 208
209enum perf_event_type { 209enum perf_event_type {
210 210
211 /*
212 * The MMAP events record the PROT_EXEC mappings so that we can
213 * correlate userspace IPs to code. They have the following structure:
214 *
215 * struct {
216 * struct perf_event_header header;
217 *
218 * u32 pid, tid;
219 * u64 addr;
220 * u64 len;
221 * u64 pgoff;
222 * char filename[];
223 * };
224 */
211 PERF_EVENT_MMAP = 1, 225 PERF_EVENT_MMAP = 1,
212 PERF_EVENT_MUNMAP = 2, 226 PERF_EVENT_MUNMAP = 2,
213 227
@@ -217,6 +231,24 @@ enum perf_event_type {
217 * 231 *
218 * These events will have types of the form: 232 * These events will have types of the form:
219 * PERF_EVENT_COUNTER_OVERFLOW { | __PERF_EVENT_* } * 233 * PERF_EVENT_COUNTER_OVERFLOW { | __PERF_EVENT_* } *
234 *
235 * struct {
236 * struct perf_event_header header;
237 *
238 * { u64 ip; } && __PERF_EVENT_IP
239 * { u32 pid, tid; } && __PERF_EVENT_TID
240 *
241 * { u64 nr;
242 * { u64 event, val; } cnt[nr]; } && __PERF_EVENT_GROUP
243 *
244 * { u16 nr,
245 * hv,
246 * kernel,
247 * user;
248 * u64 ips[nr]; } && __PERF_EVENT_CALLCHAIN
249 *
250 * { u64 time; } && __PERF_EVENT_TIME
251 * };
220 */ 252 */
221 PERF_EVENT_COUNTER_OVERFLOW = 1UL << 31, 253 PERF_EVENT_COUNTER_OVERFLOW = 1UL << 31,
222 __PERF_EVENT_IP = PERF_RECORD_IP, 254 __PERF_EVENT_IP = PERF_RECORD_IP,