mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 12:58:41 +00: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(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
// rjf: wait for signal if we need, otherwise reset loop signal & continue
|
// 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);
|
if(!ins_atomic_u32_eval(&async_loop_again))
|
||||||
}
|
{
|
||||||
else 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);
|
||||||
{
|
}
|
||||||
async_loop_again = 0;
|
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)
|
#if defined(ARTIFACT_CACHE_H)
|
||||||
ac_async_tick();
|
ac_async_tick();
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONTENT_H)
|
#if defined(CONTENT_H)
|
||||||
c_async_tick();
|
c_async_tick();
|
||||||
#endif
|
#endif
|
||||||
#if defined(FILE_STREAM_H)
|
#if defined(FILE_STREAM_H)
|
||||||
fs_async_tick();
|
fs_async_tick();
|
||||||
#endif
|
#endif
|
||||||
#if defined(TEXTURE_CACHE_H)
|
#if defined(TEXTURE_CACHE_H)
|
||||||
tex_async_tick();
|
tex_async_tick();
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// rjf: take exit signal; break if set
|
// rjf: take exit signal; break if set
|
||||||
lane_sync();
|
lane_sync();
|
||||||
|
|||||||
+1
-1
@@ -289,8 +289,8 @@ dasm_artifact_create(String8 key, B32 *retry_out)
|
|||||||
if(params.dbgi_key.path.size != 0)
|
if(params.dbgi_key.path.size != 0)
|
||||||
{
|
{
|
||||||
rdi = di_rdi_from_key(di_scope, ¶ms.dbgi_key, 1, 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
|
//- rjf: data * arch * addr * dbg -> decode artifacts
|
||||||
DASM_LineChunkList line_list = {0};
|
DASM_LineChunkList line_list = {0};
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ fs_change_gen(void)
|
|||||||
internal AC_Artifact
|
internal AC_Artifact
|
||||||
fs_artifact_create(String8 key, B32 *retry_out)
|
fs_artifact_create(String8 key, B32 *retry_out)
|
||||||
{
|
{
|
||||||
|
ProfBeginFunction();
|
||||||
Temp scratch = scratch_begin(0, 0);
|
Temp scratch = scratch_begin(0, 0);
|
||||||
|
|
||||||
//- rjf: unpack key
|
//- rjf: unpack key
|
||||||
@@ -187,6 +188,7 @@ fs_artifact_create(String8 key, B32 *retry_out)
|
|||||||
MemoryCopyStruct(&artifact, &content_key);
|
MemoryCopyStruct(&artifact, &content_key);
|
||||||
|
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
|
ProfEnd();
|
||||||
return artifact;
|
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;
|
containing_range.max -= containing_range.max%chunk_size;
|
||||||
|
|
||||||
// rjf: map to hash
|
// 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);
|
U128 hash = c_hash_from_key(key, 0);
|
||||||
|
|
||||||
// rjf: look up from hash store
|
// 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;
|
U64 file_path_string_id = space.u64_0;
|
||||||
String8 file_path = e_string_from_id(file_path_string_id);
|
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;
|
}break;
|
||||||
case RD_EvalSpaceKind_CtrlEntity:
|
case RD_EvalSpaceKind_CtrlEntity:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user