aboutsummaryrefslogtreecommitdiffstats
path: root/mm/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/debug.c')
-rw-r--r--mm/debug.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mm/debug.c b/mm/debug.c
index cdacba12e09a..6d9aa5359109 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -44,6 +44,7 @@ const struct trace_print_flags vmaflag_names[] = {
44 44
45void __dump_page(struct page *page, const char *reason) 45void __dump_page(struct page *page, const char *reason)
46{ 46{
47 struct address_space *mapping = page_mapping(page);
47 bool page_poisoned = PagePoisoned(page); 48 bool page_poisoned = PagePoisoned(page);
48 int mapcount; 49 int mapcount;
49 50
@@ -70,6 +71,18 @@ void __dump_page(struct page *page, const char *reason)
70 if (PageCompound(page)) 71 if (PageCompound(page))
71 pr_cont(" compound_mapcount: %d", compound_mapcount(page)); 72 pr_cont(" compound_mapcount: %d", compound_mapcount(page));
72 pr_cont("\n"); 73 pr_cont("\n");
74 if (PageAnon(page))
75 pr_emerg("anon ");
76 else if (PageKsm(page))
77 pr_emerg("ksm ");
78 else if (mapping) {
79 pr_emerg("%ps ", mapping->a_ops);
80 if (mapping->host->i_dentry.first) {
81 struct dentry *dentry;
82 dentry = container_of(mapping->host->i_dentry.first, struct dentry, d_u.d_alias);
83 pr_emerg("name:\"%pd\" ", dentry);
84 }
85 }
73 BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1); 86 BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1);
74 87
75 pr_emerg("flags: %#lx(%pGp)\n", page->flags, &page->flags); 88 pr_emerg("flags: %#lx(%pGp)\n", page->flags, &page->flags);