Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[linux-2.6-microblaze.git] / mm / debug.c
index d0020fc..a05a39f 100644 (file)
 #include <linux/ctype.h>
 
 #include "internal.h"
+#include <trace/events/migrate.h>
+
+/*
+ * Define EM() and EMe() so that MIGRATE_REASON from trace/events/migrate.h can
+ * be used to populate migrate_reason_names[].
+ */
+#undef EM
+#undef EMe
+#define EM(a, b)       b,
+#define EMe(a, b)      b
 
 const char *migrate_reason_names[MR_TYPES] = {
-       "compaction",
-       "memory_failure",
-       "memory_hotplug",
-       "syscall_or_cpuset",
-       "mempolicy_mbind",
-       "numa_misplaced",
-       "contig_range",
-       "longterm_pin",
-       "demotion",
+       MIGRATE_REASON
 };
 
 const struct trace_print_flags pageflag_names[] = {