Re: Multi-threaded dwarf parsing

Jan Kratochvil
2016-02-24T21:28:30Z

On Wed, 24 Feb 2016 21:37:24 +0100, Simon Marchi wrote:
> What can cause CUs to be interlinked with each other?

I did not remember, from what I am checking now it is due to dwz:
https://sourceware.org/git/?p=dwz.git;a=blob;f=dwz.c
That is a DWARF size reduction tool (by DWARF optimization, not by any
compression).

All the CUs get queued there due to its DW_AT_import:
process_imported_unit_die()->maybe_queue_comp_unit()

Without dwz I could not reproduce the queueing problem. IIRC there was some
but I admit I may not remember it right.

BTW expanding one CU is also not cheap, just its .debug_info part can be
around 1MB:
readelf -wi libwebkitgtk-1.0.so.0.5.2.debug|grep '^ *<0>'|perl -lne 'BEGIN{$l=0;} /^\s*<0><([0-9a-f]+)>/ or die;$x=eval "0x$1";print(($x-$l)." ".$_);$l=$x;'|sort -nr
But that is a sub-second delay not much of a real problem.

Jan