diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2025-06-03 12:01:45 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2025-06-04 12:51:28 +0100 |
commit | d4e9d956572a7bbf96a5500d70ddfe5a33f23ced (patch) | |
tree | 6d03076555a2e09219f2607a468daea3d365f9ad /libctf/ctf-impl.h | |
parent | cedf6f8702e53a9575db8abec25925578271d11d (diff) | |
download | binutils-d4e9d956572a7bbf96a5500d70ddfe5a33f23ced.zip binutils-d4e9d956572a7bbf96a5500d70ddfe5a33f23ced.tar.gz binutils-d4e9d956572a7bbf96a5500d70ddfe5a33f23ced.tar.bz2 |
libctf, dedup: reclaim space wasted by duplicate hidden types
In normal deduplicating links, we insert every type (identified by its
unique hash) precisely once. But conflicting types appear in multiple
dicts, so for those, we loop, inserting them into every target dict
in turn (each corresponding to an input dict that type appears in).
But in cu-mapped links, some of those dicts may have been merged into
one: now that we are hiding duplicate conflicting types more
aggressively in such links, we are getting duplicate identical hidden
types turning up in large numbers.
Fix this by eliminating them in cu-mapping phase 1 (the phase in which this
merging takes place), by checking to see if a type with this hash has
already been inserted in this dict and skipping it if so. This is
redundant and a waste of time in other cu-mapping phases and in normal
links, but in cu-mapped links it saves a few tens to hundreds of kilobytes
in kernel-sized links.
libctf/
PR libctf/33047
* ctf-dedup.c (ctf_dedup_emit_type): Check for already-emitted
types in cu-mapping phase 1.
Diffstat (limited to 'libctf/ctf-impl.h')
0 files changed, 0 insertions, 0 deletions