Commit Graph

61 Commits

Author SHA1 Message Date
Arnaldo Carvalho de Melo 5c777371cd [CLASSES]: Make cu__for_each_class receive a filter
Same semantic as in the cus__for_each_cu filter.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-12-01 00:00:24 -02:00
Arnaldo Carvalho de Melo e5a400d01f [CLASSES]: Make cus__for_each_cu receive an optional filter
To simplify the callsites and make implementing the same thing on the other
dwarves (prefcnt, pfunct, etc) easy.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-30 23:48:34 -02:00
Arnaldo Carvalho de Melo 6a3cc448d1 [CLASSES]: Introduce struct lexblock
To represent DW_TAG_lexical_block, for now just group the lists of
labels, inline expansions and variables, struct function now has
the root of the tree as ->lexblock.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-20 16:38:47 -02:00
Arnaldo Carvalho de Melo bff3938037 [CLASSES]: Introduce struct function & struct parameter
And helper routines, so as to separate DW_TAG_subprogram from
the type tags (DW_TAG_structure_type, basic_type, etc).

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-18 14:33:48 -02:00
Arnaldo Carvalho de Melo 5afa478d8d [CLASSES]: Introduce struct tag
This should have been done from the start: all DW_TAG_s will be represented by
structs that has as its first member a struct tag, so that we can fully
represent the DWARF information, following csets will take continue the
restructuring.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-18 11:54:02 -02:00
Arnaldo Carvalho de Melo 84a05e88e1 [PREFCNT]: Handle inlined functions too
At least GCC only emits DW_TAG_subprogram for inline functions if they were
used somewhere in the CU, even if no DW_TAG_inlined_subroutine tag is emitted
due to optimizations reducing inline functions to nothing.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-17 21:54:34 -02:00
Arnaldo Carvalho de Melo d3b9b9bfcf [CLASSES]: Add backpointer to class in inline_expansion
And several assorted tidy-ups.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-13 00:31:48 -02:00
Arnaldo Carvalho de Melo 9490088ae0 [CLASSES]: Use the struct cu backpointer
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-12 17:33:37 -02:00
Arnaldo Carvalho de Melo 0f5548a55f [CODIFF]: New tool
1. build, save the object
2. change it, build
3. do the diff!

[acme@newtoy net-2.6.20]$ codiff /tmp/ipv6.ko.before /tmp/ipv6.ko.after | head -22
/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/af_inet6.c:
 inet6_init              |  +50
 inet6_create            |  -15
 inet6_getname           |  +13
 inet6_sk_rebuild_header |   +5
4 functions changed, 68 bytes added, 15 bytes removed

/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/anycast.c:
 ipv6_sock_ac_join |   +7
1 function changed, 7 bytes added

/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/ip6_output.c:
 ip6_output2             |  +14
 ip6_sk_dst_lookup       |   -2
 ip6_push_pending_frames |   +5
 ip6_xmit                |   +4
 ip6_forward             |   +1
 ip6_nd_hdr              |  +13
6 functions changed, 37 bytes added, 2 bytes removed

/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv6/addrconf.c:
 ipv6_rcv_saddr_equal |  +16
[acme@newtoy net-2.6.20]$

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-11 16:31:04 -02:00
Arnaldo Carvalho de Melo e45f877489 [MAKEFILE]: Use -Wall
And fix the warnings generated.

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-11 14:15:50 -02:00
Arnaldo Carvalho de Melo 0d5f556dd7 [PREFCNT]: New tool
prefcnt is a new tool to do reference counting on all the TAGs, starting
from the list of DW_TAG_subroutine tags and going down thru the return type,
parameter list types, variables and inline expansions in the functions, to
help finding unused stuff, its not so effective because of bugs in gcc
DWARF emitting code for concrete inline instances, i.e. the inline expansions
are not all being emitted, see:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29792

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-11-10 19:19:58 -02:00