Go to file
Arnaldo Carvalho de Melo 2de67fcaf4 [PAHOLE]: Implement type expansion
What is in a struct...

[acme@filo pahole]$ pahole net/ipv6/tcp_ipv6.o delayed_work
/* <2bc9> /home/acme/git/linux-2.6/include/linux/workqueue.h:37 */
struct delayed_work {
        struct work_struct         work;                 /*     0    16 */
        struct timer_list          timer;                /*    16    24 */
}; /* size: 40, cachelines: 1 */
   /* last cacheline: 40 bytes */
[acme@filo pahole]$

Oh, but what if we want to unfold all the structs?

lo pahole]$ pahole --expand_types /home/acme/git/OUTPUT/qemu/linux-2.6/net/ipv6/tcp_ipv6.o delayed_work
/* <2bc9> /home/acme/git/linux-2.6/include/linux/workqueue.h:37 */
struct delayed_work {
        struct work_struct {
                atomic_long_t      data;                 /*   0   4 */
                struct list_head {
                        struct list_head * next;         /*   0   4 */
                        struct list_head * prev;         /*   4   4 */
                } entry;				 /*   4   8 */
                work_func_t        func;                 /*  12   4 */
        } work;						 /*   0  16 */
        struct timer_list {
                struct list_head {
                        struct list_head * next;         /*   0   4 */
                        struct list_head * prev;         /*   4   4 */
                } entry; /*     0     8 */
                long unsigned int  expires;              /*   8   4 */
                void               (*function)(long unsigned int); /*    12     4 */
                long unsigned int  data;                 /*  16   4 */
                struct tvec_t_base_s * base;             /*  20   4 */
        } timer; /*    16    24 */
}; /* size: 40, cachelines: 1 */
   /* last cacheline: 40 bytes */
[acme@filo pahole]$

Quick hack, as we already had all the needed infrastructure due to anonymous struct
printing inside structs/unions, now for the curious, if you have the kernel-debuginfo
package installed in your FC6 machine:

[acme@filo pahole]$ pahole --expand_types /usr/lib/debug/lib/modules/2.6.19-1.2895.fc6/kernel/net/ipv6/ipv6.ko.debug tcp6_sock

Try struct task_struct too 8-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-01-29 13:12:23 -02:00
cmake/modules [CMAKE]: Fix build on ubuntu 2007-01-07 23:56:43 -02:00
lib [CTRACER]: Move the jprobes init code to lib/ctracer_jprobes.c 2007-01-27 18:38:07 -02:00
rpm/SPECS [RPM]: 9th release 2007-01-27 19:42:54 -02:00
CMakeLists.txt [RPM]: 9th release 2007-01-27 19:42:54 -02:00
codiff.c [ALL]: Fixup warnings 2007-01-29 10:42:03 -02:00
ctracer.c [PAHOLE]: Implement type expansion 2007-01-29 13:12:23 -02:00
dtagnames.c [ALL]: Fixup warnings 2007-01-29 10:42:03 -02:00
dwarves.c [PAHOLE]: Implement type expansion 2007-01-29 13:12:23 -02:00
dwarves.h [PAHOLE]: Implement type expansion 2007-01-29 13:12:23 -02:00
list.h Repository creation. 2006-10-24 20:42:39 -03:00
MANIFEST [RPM]: 9th release 2007-01-27 19:42:54 -02:00
pahole.c [PAHOLE]: Implement type expansion 2007-01-29 13:12:23 -02:00
pdwtags.c [PAHOLE]: Implement type expansion 2007-01-29 13:12:23 -02:00
pfunct.c [PAHOLE]: Implement type expansion 2007-01-29 13:12:23 -02:00
prefcnt.c [PAHOLE]: Implement type expansion 2007-01-29 13:12:23 -02:00
README [README]: Add information about packages required to build 2006-12-20 10:28:44 -02:00
README.ctracer [CTRACER]: Move the jprobes init code to lib/ctracer_jprobes.c 2007-01-27 18:38:07 -02:00

Build instructions:

1. install cmake
2. mkdir build
3. cd build
4. cmake ..
5. make

Known to work scenarios:

Mandriva Cooker:

cmake 2.4.5-1mdv2007.1
libelfutils1-devel 0.123-1mdv2007.1

Debian Unstable:

cmake 2.4.5-1
libdw-dev 0.123-2