mm: mm_event: comment about enum event type ordering
Perfetto uses binary tracing so we shouldn't reordring/removing
the event type. Describe it more explicitly.
Bug: 80168800
Change-Id: I7fa415b0ddc803e9ad81590f692a46bb416b2dd9
Signed-off-by: Minchan Kim <minchan@google.com>
(cherry picked from commit ab281c5bf4753b1048d8a059342f89a0d24e9169)
diff --git a/include/linux/mm_event.h b/include/linux/mm_event.h
index 27c4725..52e6e24 100644
--- a/include/linux/mm_event.h
+++ b/include/linux/mm_event.h
@@ -2,15 +2,19 @@
#ifndef _LINUX_MM_EVENT_H
#define _LINUX_MM_EVENT_H
+/*
+ * These enums are exposed to userspace via the ftrace trace_pipe_raw endpoint
+ * and are an ABI. Userspace tools depend on them.
+ */
enum mm_event_type {
MM_MIN_FAULT = 0,
- MM_MAJ_FAULT,
- MM_READ_IO,
- MM_COMPACTION,
- MM_RECLAIM,
- MM_SWP_FAULT,
- MM_KERN_ALLOC,
- MM_TYPE_NUM,
+ MM_MAJ_FAULT = 1,
+ MM_READ_IO = 2,
+ MM_COMPACTION = 3,
+ MM_RECLAIM = 4,
+ MM_SWP_FAULT = 5,
+ MM_KERN_ALLOC = 6,
+ MM_TYPE_NUM = 7,
};
struct mm_event_task {