Commit Graph

263 Commits

Author SHA1 Message Date
Arnaldo Carvalho de Melo b5baabcd16 [ALL]: Fixup warnings
Using export CFLAGS="-Wall -Wfatal-errors -Wformat=2 -Wsequence-point -Wextra
-Wno-parentheses -g", suggested by Davi Arnault, amazing how cruft piles up
when one is not looking ;)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-01-29 10:42:03 -02:00
Davi Arnaut c9bd654d3b [PAHOLE]: Handle anonymous structs
Some are just typedefs, others are inside structs and in some cases its
useful to see the statistics for them, so add two new cmd line options:

-a, --anon_include        include anonymous classes\
-A, --nested_anon_include include nested (inside other structs) anonymous classes

Commiter note: I've reworked several aspects of the patch, but mostly to
give better names for the new find_first_typedef_of_type function, adding
a clarifying comment and introducing --nested_anon_include so that we
can select just the typedef'ed anonymous structs.

Damn, I had commited just dwarves.c, here is the dwarves.h and pahole.c bits.

Signed-off-by: Davi Arnaut <davi@haxent.com.br>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-01-28 11:07:22 -02:00
Arnaldo Carvalho de Melo 812406d9fb [LIB]: Use sysconf to get the L1 cacheline size
As suggested by Ulrich Drepper.

Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-01-18 21:41:25 -02:00
Arnaldo Carvalho de Melo 46884e3d4f [LIB]: Make the default cacheline be 64
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2007-01-18 21:18:44 -02:00
Arnaldo Carvalho de Melo 1750958111 [LIB]: Separate emission of definitions in a type from the emission of the type itself
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-16 12:11:35 -02:00
Arnaldo Carvalho de Melo 3a9ceb41ee [LIB]: Rename cus__emit_struct_definitions to cus__emit_type_definitions
To make it handle unions too.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-13 14:19:34 -02:00
Arnaldo Carvalho de Melo 7e57db18d7 [LIB]: Add support for DW_AT_specification in DW_TAG_subprogram
C++ feature, we have to look for the id, then abstract_origin and then
specification.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-13 11:37:41 -02:00
Arnaldo Carvalho de Melo f6718f5721 [LIB]: Export lexblock__print
tag__print on a DW_TAG_subprogram tag prints just the function prototype,
without the ending ";\", so if a user wants to print the whole function its
just a matter of calling tag__print + lexblock__(tag__function(tag), cu,
indent).

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-13 10:57:19 -02:00
Arnaldo Carvalho de Melo 16c0586602 [LIB]: Make all callers of function__print use tag__print instead
And since there are no external users now, just unexport it, ditto
for tag__print_decl_info.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-12 16:25:20 -02:00
Arnaldo Carvalho de Melo df1832ac4f [LIB]: Introduce tag__print_decl_info
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-12 16:11:37 -02:00
Arnaldo Carvalho de Melo 3fe4f09a27 [LIB]: Move the stats printing bits out of function__print
Moving them to a new function, function__print_stats.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-12 16:00:07 -02:00
Arnaldo Carvalho de Melo d385563a53 [LIB]: Make the function methods return and receive a struct tag
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-12 15:47:26 -02:00
Arnaldo Carvalho de Melo 30b6aa2f73 [LIB]: Rename classes.[ch] to dwarves.[ch]
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2007-01-11 16:07:05 -02:00