mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-19 12:40:10 -08:00
refactor PDB background file output
Add a shared multi-file background writer with lazy worker startup. Represent PDB output as a file artifact, keep PDB output state internal to the builder, and overlap deferred PDB writers with the file maps release.
This commit is contained in:
1 parent
c96c9620d0
commit
c629c5b10e
9 files changed
+368
-197
No files matched your search
@@ -28,6 +28,8 @@ global ArenaTableNode *free_arena_table_node = 0;
|
||||
internal Arena *
|
||||
arena_alloc_(ArenaParams *params)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
|
||||
U64 reserve_size = params->reserve_size;
|
||||
U64 commit_size = params->commit_size;
|
||||
|
||||
@@ -133,12 +135,15 @@ arena_alloc_(ArenaParams *params)
|
||||
}
|
||||
#endif
|
||||
|
||||
ProfEnd();
|
||||
return arena;
|
||||
}
|
||||
|
||||
internal void
|
||||
arena_release(Arena *arena)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
|
||||
#if PROFILE_TELEMETRY
|
||||
{
|
||||
Arena *base_arena = arena;
|
||||
@@ -171,6 +176,8 @@ arena_release(Arena *arena)
|
||||
AsanUnpoisonMemoryRegion(n, n->cmt);
|
||||
release_memory(n, n->res);
|
||||
}
|
||||
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
//- rjf: arena push/pop core functions
|
||||
|
||||
@@ -46,18 +46,22 @@ ring_try_read(Ring *ring, U64 size, void *ptr)
|
||||
internal GuardedRing *
|
||||
guarded_ring_alloc(Arena *arena, U64 size)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
GuardedRing *gr = push_array(arena, GuardedRing, 1);
|
||||
gr->ring = make_ring(arena, size);
|
||||
gr->mutex = mutex_alloc();
|
||||
gr->cv = cond_var_alloc();
|
||||
ProfEnd();
|
||||
return gr;
|
||||
}
|
||||
|
||||
internal void
|
||||
guarded_ring_release(GuardedRing *ring)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
mutex_release(ring->mutex);
|
||||
cond_var_release(ring->cv);
|
||||
ProfEnd();
|
||||
}
|
||||
|
||||
internal RingGuard
|
||||
|
||||
Reference in new issue
Block a user