Re: kmem -s issue (gdb can't get offest of struct page lru member)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave,

On Mon, 2012-01-09 at 14:06 -0500, Dave Anderson wrote:

[snip]

> > 
> > crash> struct page.lru
> > struct: invalid data structure reference: page.lru
> > 
> > Any idea why we do not get the offset from gdb?
> > Perhaps a problem with the anonymous union?
> 
> Right -- it's due to commit 49e2258586b423684f03c278149ab46d8f8b6700,
> which moved the page.lru field into an anonymous structure:
> 
>           /* Third double word block */
>   -       struct list_head lru;           /* Pageout list, eg. active_list
>   +       union {
>   +               struct list_head lru;   /* Pageout list, eg. active_list
>                                            * protected by zone->lru_lock !
>                                            */
>   +               struct {                /* slub per cpu partial pages */
>   +                       struct page *next;      /* Next partial slab */
>   +#ifdef CONFIG_64BIT
>   +                       int pages;      /* Nr of partial slabs left */
>   +                       int pobjects;   /* Approximate # of objects */
>   +#else
>   +                       short int pages;
>   +                       short int pobjects;
>   +#endif
>   +               };
>   +       };
> 
> And see https://www.redhat.com/archives/crash-utility/2012-January/msg00023.html
> for the gdb-related details.
>   
> Can you try a patch like this to vm_init():
> 
>         MEMBER_OFFSET_INIT(page_lru, "page", "lru");
> +	if (INVALID_MEMBER(page_lru))
> +               ANON_MEMBER_OFFSET_INIT(page_lru, "page", "lru");

This patch works, thanks!

Michael

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux