mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 13:58:40 +00:00
cancellation on match tasks - keep wide matches longer
This commit is contained in:
+12
-1
@@ -1500,8 +1500,18 @@ di_match_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *g
|
|||||||
//- rjf: get all loaded keys
|
//- rjf: get all loaded keys
|
||||||
DI_KeyArray dbgi_keys = di_push_all_loaded_keys(scratch.arena);
|
DI_KeyArray dbgi_keys = di_push_all_loaded_keys(scratch.arena);
|
||||||
|
|
||||||
|
//- rjf: take cancellation signal
|
||||||
|
B32 cancelled = 0;
|
||||||
|
if(lane_idx() == 0)
|
||||||
|
{
|
||||||
|
cancelled = ins_atomic_u32_eval(cancel_signal);
|
||||||
|
}
|
||||||
|
lane_sync_u64(&cancelled, 0);
|
||||||
|
|
||||||
//- rjf: wide search across all debug infos
|
//- rjf: wide search across all debug infos
|
||||||
DI_Match *lane_matches = 0;
|
DI_Match *lane_matches = 0;
|
||||||
|
if(!cancelled)
|
||||||
|
{
|
||||||
if(lane_idx() == 0)
|
if(lane_idx() == 0)
|
||||||
{
|
{
|
||||||
lane_matches = push_array(scratch.arena, DI_Match, lane_count());
|
lane_matches = push_array(scratch.arena, DI_Match, lane_count());
|
||||||
@@ -1550,6 +1560,7 @@ di_match_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *g
|
|||||||
access_close(access);
|
access_close(access);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
lane_sync();
|
lane_sync();
|
||||||
|
|
||||||
//- rjf: pick match
|
//- rjf: pick match
|
||||||
@@ -1597,7 +1608,7 @@ di_match_from_string(String8 string, U64 index, DI_Key preferred_dbgi_key, U64 e
|
|||||||
String8 key = str8_list_join(scratch.arena, &key_parts, 0);
|
String8 key = str8_list_join(scratch.arena, &key_parts, 0);
|
||||||
U64 dbgi_count = di_load_count();
|
U64 dbgi_count = di_load_count();
|
||||||
B32 wide = (dbgi_count > 256);
|
B32 wide = (dbgi_count > 256);
|
||||||
AC_Artifact artifact = ac_artifact_from_key(access, key, di_match_artifact_create, 0, endt_us, .flags = wide ? AC_Flag_Wide : 0, .gen = di_load_gen());
|
AC_Artifact artifact = ac_artifact_from_key(access, key, di_match_artifact_create, 0, endt_us, .flags = wide ? AC_Flag_Wide : 0, .gen = di_load_gen(), .evict_threshold_us = wide ? 20000000 : 10000000);
|
||||||
result.key.u64[0] = artifact.u64[0];
|
result.key.u64[0] = artifact.u64[0];
|
||||||
result.key.u64[1] = artifact.u64[1];
|
result.key.u64[1] = artifact.u64[1];
|
||||||
result.section_kind = artifact.u64[2];
|
result.section_kind = artifact.u64[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user