lkml.org 
[lkml]   [2014]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 1/3] Introduce dump_vma
On Fri, 29 Aug 2014 10:54:17 -0400 Sasha Levin <sasha.levin@oracle.com> wrote:

> Introduce a helper to dump information about a VMA, this also
> makes dump_page_flags more generic and re-uses that so the
> output looks very similar to dump_page:
>

That's another kilobyte which we don't actually use unless
CONFIG_DEBUG_VM, so how about we do

--- a/mm/page_alloc.c~introduce-dump_vma-fix
+++ a/mm/page_alloc.c
@@ -6683,6 +6683,8 @@ void dump_page(struct page *page, const
}
EXPORT_SYMBOL(dump_page);

+#ifdef CONFIG_DEBUG_VM
+
static const struct trace_print_flags vmaflags_names[] = {
{VM_READ, "read" },
{VM_WRITE, "write" },
@@ -6740,3 +6742,5 @@ void dump_vma(const struct vm_area_struc
dump_flags(vma->vm_flags, vmaflags_names, ARRAY_SIZE(vmaflags_names));
}
EXPORT_SYMBOL(dump_vma);
+
+#endif /* CONFIG_DEBUG_VM */
until someone needs it from non-debug code?


\
 
 \ /
  Last update: 2014-08-29 21:41    [W:0.043 / U:1.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site