debug info load gen, to easily key anything based on entire set of loaded debug info

This commit is contained in:
Ryan Fleury
2025-09-29 17:15:03 -07:00
parent d2678db25f
commit 4d30933c44
2 changed files with 13 additions and 0 deletions
+11
View File
@@ -337,6 +337,13 @@ di2_close(DI2_Key key)
////////////////////////////////
//~ rjf: Debug Info Lookups
internal U64
di2_load_gen(void)
{
U64 result = ins_atomic_u64_eval(&di2_shared->load_gen);
return result;
}
internal DI2_KeyArray
di2_push_all_loaded_keys(Arena *arena)
{
@@ -804,6 +811,7 @@ di2_async_tick(void)
MemoryCopyStruct(&node->rdi, &rdi_parsed);
node->completion_count += 1;
node->working_count -= 1;
ins_atomic_u64_inc_eval(&di2_shared->load_gen);
}
else
{
@@ -1062,6 +1070,9 @@ di2_search_artifact_create(String8 key, U64 gen, U64 *requested_gen, B32 *retry_
U64 dst_idx = n->base_idx + range.min;
MemoryCopy(&items.v[dst_idx], n->v, sizeof(n->v[0]) * dim_1u64(range));
}
//- rjf: sort items
}
scratch_end(scratch);
access_close(access);
+2
View File
@@ -193,6 +193,7 @@ typedef struct DI2_Shared DI2_Shared;
struct DI2_Shared
{
Arena *arena;
U64 load_gen;
// rjf: key -> path cache
U64 key2path_slots_count;
@@ -255,6 +256,7 @@ internal void di2_close(DI2_Key key);
////////////////////////////////
//~ rjf: Debug Info Lookups
internal U64 di2_load_gen(void);
internal DI2_KeyArray di2_push_all_loaded_keys(Arena *arena);
internal RDI_Parsed *di2_rdi_from_key(Access *access, DI2_Key key, B32 high_priority, U64 endt_us);