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

From: Robert Bragg
Date: Thu May 07 2015 - 10:16:14 EST


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@xxxxxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/