mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
move part of file evaluations onto new async file reads
This commit is contained in:
+15
-10
@@ -190,27 +190,32 @@ async_thread_entry_point(void *params)
|
||||
for(;;)
|
||||
{
|
||||
// rjf: wait for signal if we need, otherwise reset loop signal & continue
|
||||
if(!ins_atomic_u32_eval(&async_loop_again))
|
||||
if(lane_idx() == 0)
|
||||
{
|
||||
MutexScope(async_tick_start_mutex) cond_var_wait(async_tick_start_cond_var, async_tick_start_mutex, os_now_microseconds()+100000);
|
||||
}
|
||||
else if(lane_idx() == 0)
|
||||
{
|
||||
async_loop_again = 0;
|
||||
if(!ins_atomic_u32_eval(&async_loop_again))
|
||||
{
|
||||
MutexScope(async_tick_start_mutex) cond_var_wait(async_tick_start_cond_var, async_tick_start_mutex, os_now_microseconds()+100000);
|
||||
}
|
||||
ins_atomic_u32_eval_assign(&async_loop_again, 0);
|
||||
}
|
||||
lane_sync();
|
||||
|
||||
// rjf: do all ticks for all layers
|
||||
ProfScope("async tick")
|
||||
{
|
||||
#if defined(ARTIFACT_CACHE_H)
|
||||
ac_async_tick();
|
||||
ac_async_tick();
|
||||
#endif
|
||||
#if defined(CONTENT_H)
|
||||
c_async_tick();
|
||||
c_async_tick();
|
||||
#endif
|
||||
#if defined(FILE_STREAM_H)
|
||||
fs_async_tick();
|
||||
fs_async_tick();
|
||||
#endif
|
||||
#if defined(TEXTURE_CACHE_H)
|
||||
tex_async_tick();
|
||||
tex_async_tick();
|
||||
#endif
|
||||
}
|
||||
|
||||
// rjf: take exit signal; break if set
|
||||
lane_sync();
|
||||
|
||||
+1
-1
@@ -289,8 +289,8 @@ dasm_artifact_create(String8 key, B32 *retry_out)
|
||||
if(params.dbgi_key.path.size != 0)
|
||||
{
|
||||
rdi = di_rdi_from_key(di_scope, ¶ms.dbgi_key, 1, 0);
|
||||
stale = (stale || (rdi == &rdi_parsed_nil));
|
||||
}
|
||||
stale = (stale || (rdi == &rdi_parsed_nil));
|
||||
|
||||
//- rjf: data * arch * addr * dbg -> decode artifacts
|
||||
DASM_LineChunkList line_list = {0};
|
||||
|
||||
@@ -71,6 +71,7 @@ fs_change_gen(void)
|
||||
internal AC_Artifact
|
||||
fs_artifact_create(String8 key, B32 *retry_out)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
|
||||
//- rjf: unpack key
|
||||
@@ -187,6 +188,7 @@ fs_artifact_create(String8 key, B32 *retry_out)
|
||||
MemoryCopyStruct(&artifact, &content_key);
|
||||
|
||||
scratch_end(scratch);
|
||||
ProfEnd();
|
||||
return artifact;
|
||||
}
|
||||
|
||||
|
||||
@@ -1779,7 +1779,7 @@ rd_eval_space_read(void *u, E_Space space, void *out, Rng1U64 range)
|
||||
containing_range.max -= containing_range.max%chunk_size;
|
||||
|
||||
// rjf: map to hash
|
||||
C_Key key = fs_key_from_path_range(file_path, containing_range, 0);
|
||||
C_Key key = fs_key_from_path_range(file_path, containing_range, 0);
|
||||
U128 hash = c_hash_from_key(key, 0);
|
||||
|
||||
// rjf: look up from hash store
|
||||
@@ -2153,7 +2153,7 @@ rd_key_from_eval_space_range(E_Space space, Rng1U64 range, B32 zero_terminated)
|
||||
{
|
||||
U64 file_path_string_id = space.u64_0;
|
||||
String8 file_path = e_string_from_id(file_path_string_id);
|
||||
result = fs_key_from_path_range(file_path, range, 0);
|
||||
result = fs_key_from_path_range_new(file_path, range, 0);
|
||||
}break;
|
||||
case RD_EvalSpaceKind_CtrlEntity:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user