aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-impl.h
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2025-06-03 12:01:45 +0100
committerNick Alcock <nick.alcock@oracle.com>2025-06-04 12:51:28 +0100
commitd4e9d956572a7bbf96a5500d70ddfe5a33f23ced (patch)
tree6d03076555a2e09219f2607a468daea3d365f9ad /libctf/ctf-impl.h
parentcedf6f8702e53a9575db8abec25925578271d11d (diff)
downloadbinutils-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