~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/trace/events/migrate.h

Version: ~ [ linux-5.6 ] ~ [ linux-5.5.13 ] ~ [ linux-5.4.28 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.113 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.174 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.217 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.217 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.82 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #undef TRACE_SYSTEM
  2 #define TRACE_SYSTEM migrate
  3 
  4 #if !defined(_TRACE_MIGRATE_H) || defined(TRACE_HEADER_MULTI_READ)
  5 #define _TRACE_MIGRATE_H
  6 
  7 #include <linux/tracepoint.h>
  8 
  9 #define MIGRATE_MODE                                            \
 10         EM( MIGRATE_ASYNC,      "MIGRATE_ASYNC")                \
 11         EM( MIGRATE_SYNC_LIGHT, "MIGRATE_SYNC_LIGHT")           \
 12         EMe(MIGRATE_SYNC,       "MIGRATE_SYNC")
 13 
 14 
 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")
 23 
 24 /*
 25  * First define the enums in the above macros to be exported to userspace
 26  * via TRACE_DEFINE_ENUM().
 27  */
 28 #undef EM
 29 #undef EMe
 30 #define EM(a, b)        TRACE_DEFINE_ENUM(a);
 31 #define EMe(a, b)       TRACE_DEFINE_ENUM(a);
 32 
 33 MIGRATE_MODE
 34 MIGRATE_REASON
 35 
 36 /*
 37  * Now redefine the EM() and EMe() macros to map the enums to the strings
 38  * that will be printed in the output.
 39  */
 40 #undef EM
 41 #undef EMe
 42 #define EM(a, b)        {a, b},
 43 #define EMe(a, b)       {a, b}
 44 
 45 TRACE_EVENT(mm_migrate_pages,
 46 
 47         TP_PROTO(unsigned long succeeded, unsigned long failed,
 48                  enum migrate_mode mode, int reason),
 49 
 50         TP_ARGS(succeeded, failed, mode, reason),
 51 
 52         TP_STRUCT__entry(
 53                 __field(        unsigned long,          succeeded)
 54                 __field(        unsigned long,          failed)
 55                 __field(        enum migrate_mode,      mode)
 56                 __field(        int,                    reason)
 57         ),
 58 
 59         TP_fast_assign(
 60                 __entry->succeeded      = succeeded;
 61                 __entry->failed         = failed;
 62                 __entry->mode           = mode;
 63                 __entry->reason         = reason;
 64         ),
 65 
 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))
 71 );
 72 
 73 TRACE_EVENT(mm_numa_migrate_ratelimit,
 74 
 75         TP_PROTO(struct task_struct *p, int dst_nid, unsigned long nr_pages),
 76 
 77         TP_ARGS(p, dst_nid, nr_pages),
 78 
 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)
 84         ),
 85 
 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;
 91         ),
 92 
 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)
 98 );
 99 #endif /* _TRACE_MIGRATE_H */
100 
101 /* This part must be outside protection */
102 #include <trace/define_trace.h>
103 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp