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>
Out of struct typedef_tag, that now becomes the superclass of struct class, and
that also will be for struct enumeration, struct union_type and then finally
for struct struct_type, when struct class finally dies.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
By having its own class, struct typedef_tag.
As it, as structs, unions and enums have a common part, the node and visited
fields, required when emitting its definitions there is an opportunity for
consolidation, that will be explored when adding the specific classes for
DW_TAG_enumeration & DW_TAG_union.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
So far struct class was being used as the main data structure, switch to struct
tag, that already was the top of the tag hierarchy, being a struct class
ancestor, so reflect that and stop using struct class as the catch all class,
as a started DW_TAG_array_type tags are now represented by a new class, struct
array_type, reducing the size of struct class and reducing DW__TAG_array_type
instance memory usage.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Just dump the tag names, simple utility to help rework classes abstractions to
reduce memory footprint:
[acme@newtoy pahole]$ dtagnames /pub/scm/linux/kernel/git/acme/OUTPUT/qemu/linux-2.6/vmlinux | sort | uniq -c | sort -nr
size: 110832408
207882 formal_parameter
167305 pointer_type
106945 structure_type
82200 subroutine_type
44130 typedef
28372 array_type
9121 const_type
7940 union_type
6572 base_type
1690 enumeration_type
894 volatile_type
[acme@newtoy pahole]$
Argh, the 'struct class' catchall uses way too many memory for non
'structure_type' classes, work to do to reduce the current 105MB memory
footprint for processing a qemu vmlinux.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>