mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-02 20:18:12 +00:00
switch to thread safe hash trie map
Initial implementation of the symbol table allowed us to push symbols from one thread at a time and required a wonky lock-step and spread out logic for replacing symbols. And because it was a externally chained hash table we had to guesstimate optimal capacity for small and big targets. We erred on the side of larger capacity to prevent degradation and rehashing, however this meant small targets had to spent unreasonable amount of time memory allocing slots. With hash trie we can dynamically scale up to 4 ^ 32 items and atomically replace symbols when needed. Neat!
This commit is contained in:
@@ -333,16 +333,15 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LNK_Section **sect_id_map;
|
||||
LNK_SymbolScopeIndex scope_idx;
|
||||
LNK_SymbolList **bucket_arr;
|
||||
CV_SymbolList *pub_list_arr;
|
||||
LNK_Section **sect_id_map;
|
||||
LNK_SymbolHashTrieChunkList *chunk_lists;
|
||||
CV_SymbolList *pub_list_arr;
|
||||
|
||||
Rng1U64 *symbol_ranges;
|
||||
PDB_GsiContext *gsi;
|
||||
CV_SymbolPtrArray symbols;
|
||||
U32 *hashes;
|
||||
} LNK_BuildPublicSymbolsTaskData;
|
||||
} LNK_BuildPublicSymbolsTask;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -566,8 +565,7 @@ internal void lnk_build_pdb_public_symbols(TP_Context *tp,
|
||||
TP_Arena *arena,
|
||||
LNK_SymbolTable *symtab,
|
||||
LNK_Section **sect_id_map,
|
||||
PDB_PsiContext *psi,
|
||||
LNK_SymbolScopeIndex scope_idx);
|
||||
PDB_PsiContext *psi);
|
||||
|
||||
internal String8List lnk_build_pdb(TP_Context *tp,
|
||||
TP_Arena *tp_arena,
|
||||
|
||||
Reference in New Issue
Block a user