[PATCH] Fix CK_BAD propagation for --odr
Tom de Vries
tdevries@suse.de
Thu Feb 18 14:20:49 GMT 2021
On 2/16/21 10:11 AM, Tom de Vries wrote:
> The problem is caused by the odr code in checksum_ref_die, which skips
> checksum calculation for the children of odr types, with as unintended
> side-effect that it break the CK_BAD propagation to toplevel DIEs.
>
> Fix this by making the skipping of the checksum calculation less intrusive.
>
> Also, add the assert in partition_found_dups to catch this earlier and
> easier.
>
> Unfortunately, the fix also means that the earlier reported performance
> improvement of odr on cc1, of 42.30%:
> ...
> $ ./dwz.master cc1 -o 1 -lnone
> $ ./diff.sh cc1 1
> .debug_info red: 44.84% 111527248 61527733
> .debug_abbrev red: 40.28% 1722726 1028968
> .debug_str red: 0% 6609355 6609355
> total red: 42.30% 119859329 69166056
> ...
> to 54.55%:
> ...
> $ ./dwz.master cc1 -o 2 -lnone --odr
> $ ./diff.sh cc1 2
> .debug_info red: 57.46% 111527248 47449258
> .debug_abbrev red: 75.08% 1722726 429434
> .debug_str red: 0% 6609355 6609355
> total red: 54.55% 119859329 54488047
> ...
> pretty much disappears:
> ...
> $ ./dwz.fix cc1 -o 3 -lnone --odr
> $ ./diff.sh cc1 3
> .debug_info red: 45.44% 111527248 60858640
> .debug_abbrev red: 42.88% 1722726 984084
> .debug_str red: 0% 6609355 6609355
> total red: 42.89% 119859329 68452079
> ...
>
I managed to come up with a fix that doesn't suffer from this
performance regression.
Any comments?
Thanks,
- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-CK_BAD-propagation-for-odr.patch
Type: text/x-patch
Size: 6141 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/dwz/attachments/20210218/3c0760b5/attachment.bin>
More information about the Dwz
mailing list