Reducing the memory footprint, but more has to be done, such as to take
advantage of the strings table when handling indirect strings.
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>
except for --classes, that asks that all non-inlined functions that receive as
one of its parameter a pointer to the specified class be printed, just the name
if --verbose is not used, or its complete prototype and where it is in the
source code:
[acme@newtoy net-2.6]$ pfunct --verbose --class=inode fs/ext3/built-in.o
/* /pub/scm/linux/kernel/git/acme/net-2.6/fs/ext3/balloc.c 606 */
void ext3_free_blocks(handle_t * handle, struct inode * inode, ext3_fsblk_t block, long unsigned int count);
/* /pub/scm/linux/kernel/git/acme/net-2.6/fs/ext3/balloc.c 1404 */
ext3_fsblk_t ext3_new_blocks(handle_t * handle, struct inode * inode, ext3_fsblk_t goal, long unsigned int * count, int * errp);
/* /pub/scm/linux/kernel/git/acme/net-2.6/fs/ext3/balloc.c 1668 */
ext3_fsblk_t ext3_new_block(handle_t * handle, struct inode * inode, ext3_fsblk_t goal, int * errp);
/* /pub/scm/linux/kernel/git/acme/net-2.6/fs/ext3/balloc.c 346 */
void ext3_init_block_alloc_info(struct inode * inode);
/* /pub/scm/linux/kernel/git/acme/net-2.6/fs/ext3/balloc.c 388 */
void ext3_discard_reservation(struct inode * inode);
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
so that one can traverse all the classes loaded by classes__load.
Also export classes__find_by_id().
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
see that the function was indeed inlined:
[acme@newtoy net-2.6]$ pfunct kernel/sched.o task_running
/* /pub/scm/linux/kernel/git/acme/net-2.6/kernel/sched.c 304 */
inline int task_running(struct rq * rq, struct task_struct * p);
[acme@newtoy net-2.6]$
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>