mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-08 14:58:08 +00:00
checkpoint on more artifact cache port of ctrl process memory streaming
This commit is contained in:
@@ -123,6 +123,7 @@ ac_artifact_from_key(Access *access, String8 key, U64 gen, AC_CreateFunctionType
|
||||
n->v.create = create;
|
||||
}
|
||||
cond_var_broadcast(async_tick_start_cond_var);
|
||||
ins_atomic_u32_eval_assign(&async_loop_again, 1);
|
||||
}
|
||||
|
||||
// rjf: found node -> break
|
||||
|
||||
+29
-2
@@ -7465,6 +7465,9 @@ ASYNC_WORK_DEF(ctrl_call_stack_tree_build_work)
|
||||
|
||||
internal AC_Artifact
|
||||
ctrl_memory_artifact_create(String8 key, B32 *retry_out)
|
||||
{
|
||||
AC_Artifact artifact = {0};
|
||||
if(lane_idx() == 0)
|
||||
{
|
||||
//- rjf: unpack key
|
||||
CTRL_Handle process = {0};
|
||||
@@ -7583,10 +7586,14 @@ ctrl_memory_artifact_create(String8 key, B32 *retry_out)
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: return content key bundled as artifact
|
||||
AC_Artifact artifact = {0};
|
||||
//- rjf: bundle content key as artifact
|
||||
StaticAssert(sizeof(content_key) == sizeof(artifact), artifact_key_size_check);
|
||||
MemoryCopyStruct(&artifact, &content_key);
|
||||
}
|
||||
lane_sync_u64(&artifact.u64[0], 0);
|
||||
lane_sync_u64(&artifact.u64[1], 0);
|
||||
lane_sync_u64(&artifact.u64[2], 0);
|
||||
lane_sync_u64(&artifact.u64[3], 0);
|
||||
return artifact;
|
||||
}
|
||||
|
||||
@@ -7597,3 +7604,23 @@ ctrl_memory_artifact_destroy(AC_Artifact artifact)
|
||||
MemoryCopyStruct(&key, &artifact);
|
||||
c_close_key(key);
|
||||
}
|
||||
|
||||
internal C_Key
|
||||
ctrl_key_from_process_vaddr_range_new(CTRL_Handle process, Rng1U64 vaddr_range, B32 zero_terminated, U64 endt_us, B32 *out_is_stale)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
struct
|
||||
{
|
||||
CTRL_Handle process;
|
||||
Rng1U64 vaddr_range;
|
||||
B32 zero_terminated;
|
||||
} key_data = {process, vaddr_range, zero_terminated};
|
||||
String8 key = str8_struct(&key_data);
|
||||
Access *access = access_open();
|
||||
AC_Artifact artifact = ac_artifact_from_key(access, key, ctrl_mem_gen(), ctrl_memory_artifact_create, ctrl_memory_artifact_destroy, 2048);
|
||||
C_Key content_key = {0};
|
||||
MemoryCopyStruct(&content_key, &artifact);
|
||||
access_close(access);
|
||||
ProfEnd();
|
||||
return content_key;
|
||||
}
|
||||
|
||||
@@ -1255,5 +1255,6 @@ ASYNC_WORK_DEF(ctrl_call_stack_tree_build_work);
|
||||
|
||||
internal AC_Artifact ctrl_memory_artifact_create(String8 key, B32 *retry_out);
|
||||
internal void ctrl_memory_artifact_destroy(AC_Artifact artifact);
|
||||
internal C_Key ctrl_key_from_process_vaddr_range_new(CTRL_Handle process, Rng1U64 vaddr_range, B32 zero_terminated, U64 endt_us, B32 *out_is_stale);
|
||||
|
||||
#endif // CTRL_CORE_H
|
||||
|
||||
Reference in New Issue
Block a user