lkml.org 
[lkml]   [2019]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] trace/page_ref: print out the page migratetype name
Date
Print out the page migratetype name which is more readable.

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
include/trace/events/page_ref.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/trace/events/page_ref.h b/include/trace/events/page_ref.h
index 5d2ea93956ce..94df979c2d6b 100644
--- a/include/trace/events/page_ref.h
+++ b/include/trace/events/page_ref.h
@@ -36,11 +36,12 @@ DECLARE_EVENT_CLASS(page_ref_mod_template,
__entry->val = v;
),

- TP_printk("pfn=0x%lx flags=%s count=%d mapcount=%d mapping=%p mt=%d val=%d",
+ TP_printk("pfn=0x%lx flags=%s count=%d mapcount=%d mapping=%p mt=%s val=%d",
__entry->pfn,
show_page_flags(__entry->flags & ((1UL << NR_PAGEFLAGS) - 1)),
__entry->count,
- __entry->mapcount, __entry->mapping, __entry->mt,
+ __entry->mapcount, __entry->mapping,
+ migratetype_names[__entry->mt],
__entry->val)
);

@@ -86,11 +87,12 @@ DECLARE_EVENT_CLASS(page_ref_mod_and_test_template,
__entry->ret = ret;
),

- TP_printk("pfn=0x%lx flags=%s count=%d mapcount=%d mapping=%p mt=%d val=%d ret=%d",
+ TP_printk("pfn=0x%lx flags=%s count=%d mapcount=%d mapping=%p mt=%s val=%d ret=%d",
__entry->pfn,
show_page_flags(__entry->flags & ((1UL << NR_PAGEFLAGS) - 1)),
__entry->count,
- __entry->mapcount, __entry->mapping, __entry->mt,
+ __entry->mapcount, __entry->mapping,
+ migratetype_names[__entry->mt],
__entry->val, __entry->ret)
);

--
2.17.1
\
 
 \ /
  Last update: 2019-03-27 06:25    [W:0.037 / U:7.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site