diff options
author | Tom Tromey <tom@tromey.com> | 2024-01-12 18:29:52 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-04-16 11:54:46 -0600 |
commit | 4320a9c921db0245e9486bf3144a326434919f15 (patch) | |
tree | d02e51f3cbe43db6f3551686e82409371d8e5986 /libctf/ctf-dump.c | |
parent | 0b398cf8f30af07977763ffdf0c26547e46f8c09 (diff) | |
download | binutils-4320a9c921db0245e9486bf3144a326434919f15.zip binutils-4320a9c921db0245e9486bf3144a326434919f15.tar.gz binutils-4320a9c921db0245e9486bf3144a326434919f15.tar.bz2 |
Correctly handle DIE parent computations
Tom de Vries pointed out that the combination of sharding,
multi-threading, and per-CU "racing" means that sometimes a cross-CU
DIE reference might not be correctly resolved. However, it's
important to handle this correctly, due to some unfortunate aspects of
DWARF.
This patch implements this by arranging to preserve each worker's DIE
map through the end of index finalization. The extra data is
discarded when finalization is done. This approach also allows the
parent name resolution to be sharded, by integrating it into the
existing entry finalization loop.
In an earlier review, I remarked that addrmap couldn't be used here.
However, I was mistaken. A *mutable* addrmap cannot be used, as those
are based on splay trees and restructure the tree even during lookups
(and thus aren't thread-safe). A fixed addrmap, on the other hand, is
just a vector and is thread-safe.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30846
Diffstat (limited to 'libctf/ctf-dump.c')
0 files changed, 0 insertions, 0 deletions