[Intel-gfx] [RFC PATCH 04/11] perf: Add a PERF_RECORD_DEVICE event type

Robert Bragg robert at sixbynine.org
Thu May 7 07:15:47 PDT 2015


To allow for more extensible, device specific, perf record types this
adds a generic PERF_RECORD_DEVICE type that can be used by device
drivers. Driver developers can then document some driver-specific header
to further detail such a record's type.

Signed-off-by: Robert Bragg <robert at sixbynine.org>
---
 include/uapi/linux/perf_event.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index a25967b..688e192 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -726,6 +726,19 @@ enum perf_event_type {
 	 */
 	PERF_RECORD_MMAP2			= 10,
 
+	/*
+	 * The DEVICE record implies some device driver specific record that
+	 * will have some further mechanism for describing the contents of
+	 * the record (i.e. some driver specific event header).
+	 *
+	 * struct {
+	 *	struct perf_event_header	header;
+	 *
+	 *	struct DEVICE_EVENT_HEADER	device_header;
+	 * };
+	 */
+	PERF_RECORD_DEVICE			= 11,
+
 	PERF_RECORD_MAX,			/* non-ABI */
 };
 
-- 
2.3.2



More information about the Intel-gfx mailing list