mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-03 20:38:40 +00:00
adjust pre-emptive conversion heuristics; fix deadlock scenario in match work
This commit is contained in:
@@ -4136,7 +4136,7 @@ ctrl_thread__next_dmn_event(Arena *arena, DMN_CtrlCtx *ctrl_ctx, CTRL_Msg *msg,
|
|||||||
//- rjf: for each module, use its full path as the start to a new limited recursive
|
//- rjf: for each module, use its full path as the start to a new limited recursive
|
||||||
// directory search. cache each directory once traversed in the dbg_dir tree. if any
|
// directory search. cache each directory once traversed in the dbg_dir tree. if any
|
||||||
// node is not cached, then scan it & pre-emptively convert debug info.
|
// node is not cached, then scan it & pre-emptively convert debug info.
|
||||||
ProfScope("pre-emptively load adjacent debug info")
|
ProfScope("pre-emptively load adjacent debug info for %.*s", str8_varg(loaded_module->string))
|
||||||
{
|
{
|
||||||
//- rjf: calculate seed path
|
//- rjf: calculate seed path
|
||||||
DI_Key loaded_di_key = ctrl_dbgi_key_from_module(loaded_module);
|
DI_Key loaded_di_key = ctrl_dbgi_key_from_module(loaded_module);
|
||||||
@@ -4177,18 +4177,15 @@ ctrl_thread__next_dmn_event(Arena *arena, DMN_CtrlCtx *ctrl_ctx, CTRL_Msg *msg,
|
|||||||
parent_dir_node = next_child;
|
parent_dir_node = next_child;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- rjf: iterate from dir node up its ancestor chain - do recursive searches if:
|
//- rjf: iterate from dir node up its ancestor chain - do recursive
|
||||||
//
|
// searches if this is an ancestor of loaded modules, it has not been
|
||||||
// (a) this is the direct ancestor of a loaded module, and it has not
|
// searched yet, but it has >4 child branches, meaning it looks like
|
||||||
// been searched yet (search_count == 0)
|
// project directory
|
||||||
// (b) this is an indirect ancestor of loaded modules, it has not been
|
|
||||||
// searched yet, but it has >4 child branches, meaning it looks like
|
|
||||||
// a project directory
|
|
||||||
//
|
//
|
||||||
DI_KeyList preemptively_loaded_keys = {0};
|
DI_KeyList preemptively_loaded_keys = {0};
|
||||||
for(CTRL_DbgDirNode *dir_node = parent_dir_node; dir_node != 0; dir_node = dir_node->parent)
|
for(CTRL_DbgDirNode *dir_node = parent_dir_node; dir_node != 0; dir_node = dir_node->parent)
|
||||||
{
|
{
|
||||||
if(dir_node->search_count == 0 && (dir_node == parent_dir_node || dir_node->child_count >= 4))
|
if(dir_node->search_count == 0 && dir_node->child_count >= 4)
|
||||||
{
|
{
|
||||||
//- rjf: form full path of this directory node
|
//- rjf: form full path of this directory node
|
||||||
String8List dir_node_path_parts = {0};
|
String8List dir_node_path_parts = {0};
|
||||||
|
|||||||
+3
-1
@@ -826,6 +826,7 @@ ASYNC_WORK_DEF(di_parse_work)
|
|||||||
//
|
//
|
||||||
DI_Key key = {0};
|
DI_Key key = {0};
|
||||||
di_u2p_dequeue_key(scratch.arena, &key);
|
di_u2p_dequeue_key(scratch.arena, &key);
|
||||||
|
ProfBegin("di_parse_work: %.*s", str8_varg(key.path));
|
||||||
String8 og_path = key.path;
|
String8 og_path = key.path;
|
||||||
U64 min_timestamp = key.min_timestamp;
|
U64 min_timestamp = key.min_timestamp;
|
||||||
|
|
||||||
@@ -1117,6 +1118,7 @@ ASYNC_WORK_DEF(di_parse_work)
|
|||||||
|
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
ProfEnd();
|
ProfEnd();
|
||||||
|
ProfEnd();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1723,7 +1725,7 @@ ASYNC_WORK_DEF(di_match_work)
|
|||||||
{
|
{
|
||||||
DI_Scope *di_scope = di_scope_open();
|
DI_Scope *di_scope = di_scope_open();
|
||||||
DI_Key key = params_keys.v[dbgi_idx];
|
DI_Key key = params_keys.v[dbgi_idx];
|
||||||
RDI_Parsed *rdi = di_rdi_from_key(di_scope, &key, max_U64);
|
RDI_Parsed *rdi = di_rdi_from_key(di_scope, &key, os_now_microseconds()+1000);
|
||||||
for EachElement(name_map_kind_idx, name_map_kinds)
|
for EachElement(name_map_kind_idx, name_map_kinds)
|
||||||
{
|
{
|
||||||
RDI_NameMap *name_map = rdi_element_from_name_idx(rdi, NameMaps, name_map_kinds[name_map_kind_idx]);
|
RDI_NameMap *name_map = rdi_element_from_name_idx(rdi, NameMaps, name_map_kinds[name_map_kind_idx]);
|
||||||
|
|||||||
Reference in New Issue
Block a user