On 11/25/2016 11:42 AM, Vlastimil Babka wrote:

>       pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx",
>                 page, page_ref_count(page), mapcount,
> @@ -59,6 +61,21 @@ void __dump_page(struct page *page, const char *reason)
>  
>       pr_emerg("flags: %#lx(%pGp)\n", page->flags, &page->flags);
>  
> +     pr_alert("raw struct page data:");
> +     for (i = 0; i < sizeof(struct page) / sizeof(unsigned long); i++) {
> +             unsigned long *word_ptr;
> +
> +             word_ptr = ((unsigned long *) page) + i;
> +
> +             if ((i % words_per_line) == 0) {
> +                     pr_cont("\n");
> +                     pr_alert(" %016lx", *word_ptr);
> +             } else {
> +                     pr_cont(" %016lx", *word_ptr);
> +             }
> +     }
> +     pr_cont("\n");
> +

Single call to print_hex_dump() could replace this loop.

>       if (reason)
>               pr_alert("page dumped because: %s\n", reason);
>  
> 

Reply via email to