diff --git a/src/ctrl/ctrl_core.c b/src/ctrl/ctrl_core.c index d791b475..a2204d36 100644 --- a/src/ctrl/ctrl_core.c +++ b/src/ctrl/ctrl_core.c @@ -3314,6 +3314,7 @@ ctrl_thread__entry_point(void *p) internal void ctrl_thread__append_resolved_module_user_bp_traps(Arena *arena, CTRL_Handle process, CTRL_Handle module, CTRL_UserBreakpointList *user_bps, DMN_TrapChunkList *traps_out) { + if(user_bps->first == 0) { return; } Temp scratch = scratch_begin(&arena, 1); DI_Scope *di_scope = di_scope_open(); CTRL_Entity *module_entity = ctrl_entity_from_handle(ctrl_state->ctrl_thread_entity_store, module); @@ -4136,6 +4137,8 @@ ctrl_thread__next_dmn_event(Arena *arena, DMN_CtrlCtx *ctrl_ctx, CTRL_Msg *msg, (ctrl_state->ctrl_thread_entity_store->entity_kind_counts[CTRL_EntityKind_Module] > 256 || ctrl_state->ctrl_thread_entity_store->entity_kind_counts[CTRL_EntityKind_Module] == 1)) { + U64 endt_us = os_now_microseconds() + 1000000; + //- rjf: unpack event CTRL_Handle process_handle = ctrl_handle_make(CTRL_MachineID_Local, event->process); CTRL_Handle loaded_module_handle = ctrl_handle_make(CTRL_MachineID_Local, event->module); @@ -4292,7 +4295,7 @@ ctrl_thread__next_dmn_event(Arena *arena, DMN_CtrlCtx *ctrl_ctx, CTRL_Msg *msg, for(DI_KeyNode *n = preemptively_loaded_keys.first; n != 0; n = n->next) { DI_Scope *di_scope = di_scope_open(); - RDI_Parsed *rdi = di_rdi_from_key(di_scope, &n->v, max_U64); + RDI_Parsed *rdi = di_rdi_from_key(di_scope, &n->v, endt_us); di_scope_close(di_scope); di_close(&n->v); } diff --git a/src/raddbg/raddbg_main.c b/src/raddbg/raddbg_main.c index 994b3280..8c3725f9 100644 --- a/src/raddbg/raddbg_main.c +++ b/src/raddbg/raddbg_main.c @@ -1079,21 +1079,21 @@ entry_point(CmdLine *cmd_line) //- rjf: convert P2R_Convert2Bake *convert2bake = 0; - if(out_file_is_good) + if(out_file_is_good) ProfScope("convert") { convert2bake = p2r_convert(scratch.arena, user2convert); } //- rjf: bake P2R_Bake2Serialize *bake2srlz = 0; - ProfScope("bake") + if(out_file_is_good) ProfScope("bake") { bake2srlz = p2r_bake(scratch.arena, convert2bake); } //- rjf: serialize P2R_Serialize2File *srlz2file = 0; - ProfScope("serialize") + if(out_file_is_good) ProfScope("serialize") { srlz2file = push_array(scratch.arena, P2R_Serialize2File, 1); srlz2file->bundle = rdim_serialized_section_bundle_from_bake_results(&bake2srlz->bake_results); @@ -1101,14 +1101,18 @@ entry_point(CmdLine *cmd_line) //- rjf: compress P2R_Serialize2File *srlz2file_compressed = srlz2file; - if(cmd_line_has_flag(cmd_line, str8_lit("compress"))) ProfScope("compress") + if(out_file_is_good) if(cmd_line_has_flag(cmd_line, str8_lit("compress"))) ProfScope("compress") { srlz2file_compressed = push_array(scratch.arena, P2R_Serialize2File, 1); srlz2file_compressed = p2r_compress(scratch.arena, srlz2file); } //- rjf: serialize - String8List blobs = rdim_file_blobs_from_section_bundle(scratch.arena, &srlz2file_compressed->bundle); + String8List blobs = {0}; + if(out_file_is_good) + { + blobs = rdim_file_blobs_from_section_bundle(scratch.arena, &srlz2file_compressed->bundle); + } //- rjf: write if(out_file_is_good) diff --git a/src/scratch/convertperf.c b/src/scratch/convertperf.c index d15901b2..423f5b79 100644 --- a/src/scratch/convertperf.c +++ b/src/scratch/convertperf.c @@ -42,8 +42,7 @@ entry_point(CmdLine *cmdline) String8List lines = str8_split(arena, list_data, splits, ArrayCount(splits), 0); OS_HandleList processes = {0}; String8Node *processes_first_path_n = 0; - - U64 limit = 32; + U64 limit = 64; U64 idx = 0; for(String8Node *n = lines.first; n != 0; n = n->next) { @@ -54,7 +53,7 @@ entry_point(CmdLine *cmdline) String8 dll_name = str8_skip_last_slash(dll_path_no_ext); String8 pdb_path = push_str8f(arena, "%S.pdb", dll_path_no_ext); String8 rdi_path = push_str8f(arena, "dump/%S.rdi", dll_name); - OS_Handle handle = os_cmd_line_launchf("raddbg --convert --work_threads_count:1 --pdb:%S --out:%S", pdb_path, rdi_path); + OS_Handle handle = os_cmd_line_launchf("raddbg --convert --pdb:%S --out:%S", pdb_path, rdi_path); os_handle_list_push(arena, &processes, handle); if(processes_first_path_n == 0) {