[acme@newtoy guinea_pig-2.6]$ pahole -t ../../acme/OUTPUT/qemu/net-2.6/vmlinux | sort -k2 -nr | head -5
list_head 468
__wait_queue_head 466
timespec 466
rw_semaphore 466
plist_head 466
[acme@newtoy guinea_pig-2.6]$
Which leads to another, more non-trivia question, what if a struct
definition is included but there are no references to this function?
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
With some of the options in pfunct, such as:
[acme@newtoy guinea_pig-2.6]$ pahole --sizes kernel/sched.o | sort -k2 -nr | head -5
pglist_data: 3456
task_struct: 2704
rq: 2480
mmu_gather: 2040
zone: 1664
[acme@newtoy guinea_pig-2.6]$
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
So that we can find all the cus for some specific class
(cus__find_class_by_name), or traverse all the CUs (cus__for_each_cu),
etc.
Now we don't look at just the first CU in multi-CU files (vmlinux, etc).
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
types for each CU, for now when working on multi-CU files (vmlinux, any binary
with more than one object file linked) we look only at the first CU when
looking for a specific class or function name, this will be fixed in the
upcoming csets, but doesn't affect the case when we don't specify a class or
function name, where all the CU's are traversed.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
print just the structs with holes, that indeed is what we do now if no class
name is passed.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
call it if the class ->tag is DW_TAG_structure_type, and do a basic
print for the other tags.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Dwarf_Attribute to work on, as we just return a integer and it handles more
than just unsigned ints.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
much cleaner and now uses what seems to be a better maintained DWARF library
that hopefully works well on 64bit platforms, well see.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
struct foo {
char c:1;
int b:1;
short a:1;
};
the first byte_size for the first member (c) will be 1, as the "type"
is char, but the compiler combines all of them into a single 4 byte
bitfield, and the '4' only appear when the bit field has type int, in
the above case on the second member.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
found is equal to the sizeof of the structure and emit a "BRAIN FART ALERT!" if
this assertion fails, good news is that no such brain farts ocurred so far :-)
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
class instance for the DW_TAG_subroutine_type tag and class->members for the
list of DW_TAG_formal_parameter, if any.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>