2 #define TRACE_SYSTEM migrate
4 #if !defined(_TRACE_MIGRATE_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_MIGRATE_H
8 {MIGRATE_ASYNC, "MIGRATE_ASYNC"}, \
9 {MIGRATE_SYNC_LIGHT, "MIGRATE_SYNC_LIGHT"}, \
10 {MIGRATE_SYNC, "MIGRATE_SYNC"}
12 #define MIGRATE_REASON \
13 {MR_COMPACTION, "compaction"}, \
14 {MR_MEMORY_FAILURE, "memory_failure"}, \
15 {MR_MEMORY_HOTPLUG, "memory_hotplug"}, \
16 {MR_SYSCALL, "syscall_or_cpuset"}, \
17 {MR_MEMPOLICY_MBIND, "mempolicy_mbind"}, \
20 TRACE_EVENT(mm_migrate_pages
,
22 TP_PROTO(unsigned long succeeded
, unsigned long failed
,
23 enum migrate_mode mode
, int reason
),
25 TP_ARGS(succeeded
, failed
, mode
, reason
),
28 __field( unsigned long, succeeded
)
29 __field( unsigned long, failed
)
30 __field( enum migrate_mode
, mode
)
35 __entry
->succeeded
= succeeded
;
36 __entry
->failed
= failed
;
38 __entry
->reason
= reason
;
41 TP_printk("nr_succeeded=%lu nr_failed=%lu mode=%s reason=%s",
44 __print_symbolic(__entry
->mode
, MIGRATE_MODE
),
45 __print_symbolic(__entry
->reason
, MIGRATE_REASON
))
48 #endif /* _TRACE_MIGRATE_H */
50 /* This part must be outside protection */
51 #include <trace/define_trace.h>