fixes / jank pass

This commit is contained in:
Ryan Fleury
2024-10-10 07:13:47 -07:00
parent 0359998a8b
commit 848b26bbd9
4 changed files with 9 additions and 17 deletions
+2 -2
View File
@@ -2515,7 +2515,7 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P
} }
// rjf: virtual address location -> add breakpoint for address // rjf: virtual address location -> add breakpoint for address
if(bp->vaddr != 0) else if(bp->vaddr != 0)
{ {
CTRL_UserBreakpoint ctrl_user_bp = {CTRL_UserBreakpointKind_VirtualAddress}; CTRL_UserBreakpoint ctrl_user_bp = {CTRL_UserBreakpointKind_VirtualAddress};
ctrl_user_bp.u64 = bp->vaddr; ctrl_user_bp.u64 = bp->vaddr;
@@ -2524,7 +2524,7 @@ d_tick(Arena *arena, D_TargetArray *targets, D_BreakpointArray *breakpoints, D_P
} }
// rjf: symbol name location -> add breakpoint for symbol name // rjf: symbol name location -> add breakpoint for symbol name
if(bp->symbol_name.size != 0) else if(bp->symbol_name.size != 0)
{ {
CTRL_UserBreakpoint ctrl_user_bp = {CTRL_UserBreakpointKind_SymbolNameAndOffset}; CTRL_UserBreakpoint ctrl_user_bp = {CTRL_UserBreakpointKind_SymbolNameAndOffset};
ctrl_user_bp.string = bp->symbol_name; ctrl_user_bp.string = bp->symbol_name;
+4 -3
View File
@@ -14590,6 +14590,7 @@ rd_frame(void)
if(rd_regs()->vaddr != 0) if(rd_regs()->vaddr != 0)
{ {
rd_entity_equip_vaddr(location, rd_regs()->vaddr); rd_entity_equip_vaddr(location, rd_regs()->vaddr);
rd_entity_equip_name(location, str8_zero());
} }
if(rd_regs()->file_path.size != 0) if(rd_regs()->file_path.size != 0)
{ {
@@ -14671,9 +14672,9 @@ rd_frame(void)
{ {
RD_Entity *wp = n->entity; RD_Entity *wp = n->entity;
RD_Entity *loc = rd_entity_child_from_kind(wp, RD_EntityKind_Location); RD_Entity *loc = rd_entity_child_from_kind(wp, RD_EntityKind_Location);
if((loc->flags & RD_EntityFlag_HasTextPoint && path_match_normalized(loc->string, file_path) && loc->text_point.line == pt.line) || if(str8_match(wp->string, string, 0) &&
(loc->flags & RD_EntityFlag_HasVAddr && loc->vaddr == vaddr) || ((loc->flags & RD_EntityFlag_HasTextPoint && path_match_normalized(loc->string, file_path) && loc->text_point.line == pt.line) ||
(!(loc->flags & RD_EntityFlag_HasTextPoint) && str8_match(loc->string, string, 0))) (loc->flags & RD_EntityFlag_HasVAddr && loc->vaddr == vaddr)))
{ {
rd_entity_mark_for_deletion(wp); rd_entity_mark_for_deletion(wp);
removed_already_existing = 1; removed_already_existing = 1;
+1 -1
View File
@@ -5402,7 +5402,7 @@ RD_VIEW_RULE_UI_FUNCTION_DEF(watch_pins)
rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.75f, .dequote_string = 1); rd_watch_view_column_alloc(wv, RD_WatchViewColumnKind_Value, 0.75f, .dequote_string = 1);
} }
rd_watch_view_build(wv, RD_WatchViewFlag_NoHeader|RD_WatchViewFlag_PrettyNameMembers|RD_WatchViewFlag_PrettyEntityRows|RD_WatchViewFlag_DisableCacheLines, rd_watch_view_build(wv, RD_WatchViewFlag_NoHeader|RD_WatchViewFlag_PrettyNameMembers|RD_WatchViewFlag_PrettyEntityRows|RD_WatchViewFlag_DisableCacheLines,
str8_lit("watch_pins"), str8_lit("only: label location str"), 0, 10, rect); str8_lit("watch_pins"), str8_lit("only: label source_location address_location str"), 0, 10, rect);
ProfEnd(); ProfEnd();
} }
+2 -11
View File
@@ -1127,8 +1127,6 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
ui_set_next_text_alignment(UI_TextAlign_Center); ui_set_next_text_alignment(UI_TextAlign_Center);
UI_Key thread_box_key = ui_key_from_stringf(top_container_box->key, "###ip_%I64x_%p", line_num, thread); UI_Key thread_box_key = ui_key_from_stringf(top_container_box->key, "###ip_%I64x_%p", line_num, thread);
UI_Box *thread_box = ui_build_box_from_key(UI_BoxFlag_DisableTextTrunc| UI_Box *thread_box = ui_build_box_from_key(UI_BoxFlag_DisableTextTrunc|
UI_BoxFlag_DrawHotEffects|
UI_BoxFlag_DrawBorder|
UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)| UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)|
UI_BoxFlag_DrawText, UI_BoxFlag_DrawText,
thread_box_key); thread_box_key);
@@ -1277,8 +1275,6 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
ui_set_next_text_alignment(UI_TextAlign_Center); ui_set_next_text_alignment(UI_TextAlign_Center);
UI_Key thread_box_key = ui_key_from_stringf(top_container_box->key, "###ip_%I64x_catchall_%p", line_num, thread); UI_Key thread_box_key = ui_key_from_stringf(top_container_box->key, "###ip_%I64x_catchall_%p", line_num, thread);
UI_Box *thread_box = ui_build_box_from_key(UI_BoxFlag_DisableTextTrunc| UI_Box *thread_box = ui_build_box_from_key(UI_BoxFlag_DisableTextTrunc|
UI_BoxFlag_DrawHotEffects|
UI_BoxFlag_DrawBorder|
UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)| UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)|
UI_BoxFlag_DrawText, UI_BoxFlag_DrawText,
thread_box_key); thread_box_key);
@@ -1391,8 +1387,6 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = bp_color)); ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = bp_color));
ui_set_next_text_alignment(UI_TextAlign_Center); ui_set_next_text_alignment(UI_TextAlign_Center);
UI_Box *bp_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText| UI_Box *bp_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|
UI_BoxFlag_DrawHotEffects|
UI_BoxFlag_DrawBorder|
UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)| UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)|
UI_BoxFlag_DisableTextTrunc, UI_BoxFlag_DisableTextTrunc,
"%S##bp_%p", "%S##bp_%p",
@@ -1450,9 +1444,6 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = color)); ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = color));
ui_set_next_text_alignment(UI_TextAlign_Center); ui_set_next_text_alignment(UI_TextAlign_Center);
UI_Box *pin_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText| UI_Box *pin_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|
UI_BoxFlag_DrawActiveEffects|
UI_BoxFlag_DrawHotEffects|
UI_BoxFlag_DrawBorder|
UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)| UI_BoxFlag_Clickable*!!(params->flags & RD_CodeSliceFlag_Clickable)|
UI_BoxFlag_DisableTextTrunc, UI_BoxFlag_DisableTextTrunc,
"%S##watch_%p", "%S##watch_%p",
@@ -1899,8 +1890,8 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
U64 line_vaddr = params->line_vaddrs[line_idx]; U64 line_vaddr = params->line_vaddrs[line_idx];
rd_cmd(RD_CmdKind_RelocateEntity, rd_cmd(RD_CmdKind_RelocateEntity,
.entity = rd_handle_from_entity(dropped_entity), .entity = rd_handle_from_entity(dropped_entity),
.file_path = rd_regs()->file_path, .file_path = line_vaddr == 0 ? rd_regs()->file_path : str8_zero(),
.cursor = txt_pt(line_num, 1), .cursor = line_vaddr == 0 ? txt_pt(line_num, 1) : txt_pt(0, 0),
.vaddr = line_vaddr); .vaddr = line_vaddr);
} }
if(line_drag_ctrl_entity != &ctrl_entity_nil && rd_drag_drop() && contains_1s64(params->line_num_range, mouse_pt.line)) if(line_drag_ctrl_entity != &ctrl_entity_nil && rd_drag_drop() && contains_1s64(params->line_num_range, mouse_pt.line))