|
From: <sv...@va...> - 2008-09-06 19:28:55
|
Author: sewardj Date: 2008-09-06 20:29:04 +0100 (Sat, 06 Sep 2008) New Revision: 8571 Log: A major overhaul of the Dwarf3 variable-location and type reader (the thing in readdwarf3.c). The changes drastically reduce the amount of memory needed to read and store locations and types of variables, and in particular make it actually usable for Dwarf3 generated by gcc-4.2 and later. Unfortunately the changes also make it significantly slower (possible improvements are pending). The main changes are: * simplify the representation of all type-related entities in Dwarf3 (see priv_tytypes.h). A single unified type 'TyEnt' replaces the types TyAtom, Type, TyBounds, D3Expr, TyAdmin and probably a couple of others. * get rid of the inter-type-entity resolution process. Inter-entity references (eg, from an array type to the type of its elements and to its bounds) are left as-is. * use an iterative merging-and-substitution algorithm to get rid of type entities which are structurally identical. Because of the substitution aspect, duplication is removed even in cases where type entities refer to other entities. For large .so's, this often reduces the number of type entities that need to be stored by a factor of 10 or more. * fix a huge space leak caused by gratuitous duplication of range lists. Range lists are now not duplicated during the processing. There are many opportunities for reducing space usage still further; however this change deals effectively with the worst offenders as of gcc-4.3. Also, add cost-center annotations to all allocation points. Modified: branches/YARD/coregrind/m_debuginfo/debuginfo.c branches/YARD/coregrind/m_debuginfo/misc.c branches/YARD/coregrind/m_debuginfo/priv_d3basics.h branches/YARD/coregrind/m_debuginfo/priv_misc.h branches/YARD/coregrind/m_debuginfo/priv_storage.h branches/YARD/coregrind/m_debuginfo/priv_tytypes.h branches/YARD/coregrind/m_debuginfo/readdwarf.c branches/YARD/coregrind/m_debuginfo/readdwarf3.c branches/YARD/coregrind/m_debuginfo/readelf.c branches/YARD/coregrind/m_debuginfo/readstabs.c branches/YARD/coregrind/m_debuginfo/storage.c branches/YARD/coregrind/m_debuginfo/tytypes.c [... diff too large to include ...] |