mm: compaction: show gfp flag names in try_to_compact_pages tracepoint
authorYafang Shao <laoar.shao@gmail.com>
Tue, 14 May 2019 00:17:44 +0000 (17:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 May 2019 16:47:46 +0000 (09:47 -0700)
Showing the gfp flag names instead of the gfp_mask makes trace more
convenient.

Link: http://lkml.kernel.org/r/1552527998-13162-1-git-send-email-laoar.shao@gmail.com
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/trace/events/compaction.h

index 6074eff3d766d6bde63975a69df795e23b65bd79..e66afb81815a341d9201c959134c590a47ad9c13 100644 (file)
@@ -189,9 +189,9 @@ TRACE_EVENT(mm_compaction_try_to_compact_pages,
                __entry->prio = prio;
        ),
 
-       TP_printk("order=%d gfp_mask=0x%x priority=%d",
+       TP_printk("order=%d gfp_mask=%s priority=%d",
                __entry->order,
-               __entry->gfp_mask,
+               show_gfp_flags(__entry->gfp_mask),
                __entry->prio)
 );