perf hists: Move sort__has_sym into struct perf_hpp_list
[linux/fpc-iii.git] / include / trace / events / migrate.h
blob539b25a76111fc644e1103d744c53ebf78a8fb17
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM migrate
4 #if !defined(_TRACE_MIGRATE_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_MIGRATE_H
7 #include <linux/tracepoint.h>
9 #define MIGRATE_MODE \
10 EM( MIGRATE_ASYNC, "MIGRATE_ASYNC") \
11 EM( MIGRATE_SYNC_LIGHT, "MIGRATE_SYNC_LIGHT") \
12 EMe(MIGRATE_SYNC, "MIGRATE_SYNC")
15 #define MIGRATE_REASON \
16 EM( MR_COMPACTION, "compaction") \
17 EM( MR_MEMORY_FAILURE, "memory_failure") \
18 EM( MR_MEMORY_HOTPLUG, "memory_hotplug") \
19 EM( MR_SYSCALL, "syscall_or_cpuset") \
20 EM( MR_MEMPOLICY_MBIND, "mempolicy_mbind") \
21 EM( MR_NUMA_MISPLACED, "numa_misplaced") \
22 EMe(MR_CMA, "cma")
25 * First define the enums in the above macros to be exported to userspace
26 * via TRACE_DEFINE_ENUM().
28 #undef EM
29 #undef EMe
30 #define EM(a, b) TRACE_DEFINE_ENUM(a);
31 #define EMe(a, b) TRACE_DEFINE_ENUM(a);
33 MIGRATE_MODE
34 MIGRATE_REASON
37 * Now redefine the EM() and EMe() macros to map the enums to the strings
38 * that will be printed in the output.
40 #undef EM
41 #undef EMe
42 #define EM(a, b) {a, b},
43 #define EMe(a, b) {a, b}
45 TRACE_EVENT(mm_migrate_pages,
47 TP_PROTO(unsigned long succeeded, unsigned long failed,
48 enum migrate_mode mode, int reason),
50 TP_ARGS(succeeded, failed, mode, reason),
52 TP_STRUCT__entry(
53 __field( unsigned long, succeeded)
54 __field( unsigned long, failed)
55 __field( enum migrate_mode, mode)
56 __field( int, reason)
59 TP_fast_assign(
60 __entry->succeeded = succeeded;
61 __entry->failed = failed;
62 __entry->mode = mode;
63 __entry->reason = reason;
66 TP_printk("nr_succeeded=%lu nr_failed=%lu mode=%s reason=%s",
67 __entry->succeeded,
68 __entry->failed,
69 __print_symbolic(__entry->mode, MIGRATE_MODE),
70 __print_symbolic(__entry->reason, MIGRATE_REASON))
73 TRACE_EVENT(mm_numa_migrate_ratelimit,
75 TP_PROTO(struct task_struct *p, int dst_nid, unsigned long nr_pages),
77 TP_ARGS(p, dst_nid, nr_pages),
79 TP_STRUCT__entry(
80 __array( char, comm, TASK_COMM_LEN)
81 __field( pid_t, pid)
82 __field( int, dst_nid)
83 __field( unsigned long, nr_pages)
86 TP_fast_assign(
87 memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
88 __entry->pid = p->pid;
89 __entry->dst_nid = dst_nid;
90 __entry->nr_pages = nr_pages;
93 TP_printk("comm=%s pid=%d dst_nid=%d nr_pages=%lu",
94 __entry->comm,
95 __entry->pid,
96 __entry->dst_nid,
97 __entry->nr_pages)
99 #endif /* _TRACE_MIGRATE_H */
101 /* This part must be outside protection */
102 #include <trace/define_trace.h>