Re: [PATCH 1/3] Introduce dump_vma

From: Andrew Morton
Date: Fri Aug 29 2014 - 15:37:35 EST


On Fri, 29 Aug 2014 10:54:17 -0400 Sasha Levin <sasha.levin@xxxxxxxxxx> 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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/