#define STACK_PRINT_FLAG_STACK 0x1
#define STACK_PRINT_FLAG_PAGES 0x2
+#define STACK_PRINT_FLAG_HANDLE 0x4
struct stack_print_ctx {
struct stack *stack;
for (i = 0; i < nr_entries; i++)
seq_printf(m, " %pS\n", (void *)entries[i]);
}
+ if (ctx->flags & STACK_PRINT_FLAG_HANDLE)
+ seq_printf(m, "handle: %d\n", stack_record->handle.handle);
if (ctx->flags & STACK_PRINT_FLAG_PAGES)
seq_printf(m, "nr_base_pages: %d\n\n", nr_base_pages);
(void *)(STACK_PRINT_FLAG_STACK |
STACK_PRINT_FLAG_PAGES),
&page_owner_stack_operations);
+ debugfs_create_file("show_handles", 0400, dir,
+ (void *)(STACK_PRINT_FLAG_HANDLE |
+ STACK_PRINT_FLAG_PAGES),
+ &page_owner_stack_operations);
debugfs_create_file("count_threshold", 0600, dir, NULL,
&proc_page_owner_threshold);