summaryrefslogtreecommitdiff
path: root/typecontainer.cpp
diff options
context:
space:
mode:
authorWeiN76LQh <WeiN76LQh@github.com>2024-11-25 19:34:36 +0000
committerkat <kat@vector35.com>2025-02-10 10:33:20 -0500
commit8953660bbbd0fc8f15be004f3302886f34f620df (patch)
tree4d222a99fc954787f7d9c0d464966d48b67d3dcf /typecontainer.cpp
parent1bf89807c428ebb2e4aaf2d0e0f0772e1878bbff (diff)
[SharedCache] Use `m_exportInfos` as an export list cache
`SharedCache::ParseExportTrie` is getting called a lot during DSC library loading and analysis. In large part due to the hot path `SharedCache::FindSymbolAtAddrAndApplyToAddr`. Its unnecessary for it to be being called more than once per DSC header as the export list symbol information is stored in `SharedCache::m_exportInfos`. This commit adds the function `SharedCache::GetExportListForHeader`, which will either return the header's list of symbol information cached in `SharedCache::m_exportInfos` or call `SharedCache::ParseExportTrie` and cache the results in `SharedCache::m_exportInfos`. This should also improve the execution time of `SharedCache::LoadAllSymbolsAndWait`. Further improvement here would be to add locking to `SharedCache::GetExportListForHeader` so that races don't result in redundant parsing of the export trie for the same header if multiple threads call `SharedCache::GetExportListForHeader` at the same time for the same header. This only really matters during initial loading because from what I can tell that parses all the export trie's anyway.
Diffstat (limited to 'typecontainer.cpp')
0 files changed, 0 insertions, 0 deletions