mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 05:48:40 +00:00
set up inline site info building scaffolding
This commit is contained in:
+1
-1
@@ -74,7 +74,7 @@ commands =
|
|||||||
},
|
},
|
||||||
.rjf_f4 =
|
.rjf_f4 =
|
||||||
{
|
{
|
||||||
.win = "build rdi_from_pdb release telemetry && pushd build && rdi_from_pdb.exe --pdb:mule_main.pdb --out:mule_main.rdi --capture && popd",
|
.win = "build rdi_from_pdb release telemetry && pushd build && rdi_from_pdb.exe --pdb:UnrealEditorFortnite.pdb --out:profile.rdi --capture && popd",
|
||||||
.linux = "",
|
.linux = "",
|
||||||
.out = "*compilation*",
|
.out = "*compilation*",
|
||||||
.footer_panel = true,
|
.footer_panel = true,
|
||||||
|
|||||||
@@ -833,6 +833,61 @@ rdim_symbol_chunk_list_concat_in_place(RDIM_SymbolChunkList *dst, RDIM_SymbolChu
|
|||||||
rdim_memzero_struct(to_push);
|
rdim_memzero_struct(to_push);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: [Building] Inline Site Info Building
|
||||||
|
|
||||||
|
RDI_PROC RDIM_InlineSite *
|
||||||
|
rdim_inline_site_chunk_list_push(RDIM_Arena *arena, RDIM_InlineSiteChunkList *list, RDI_U64 cap)
|
||||||
|
{
|
||||||
|
RDIM_InlineSiteChunkNode *n = list->last;
|
||||||
|
if(n == 0 || n->count >= n->cap)
|
||||||
|
{
|
||||||
|
n = rdim_push_array(arena, RDIM_InlineSiteChunkNode, 1);
|
||||||
|
n->cap = cap;
|
||||||
|
n->base_idx = list->total_count;
|
||||||
|
n->v = rdim_push_array(arena, RDIM_InlineSite, n->cap);
|
||||||
|
RDIM_SLLQueuePush(list->first, list->last, n);
|
||||||
|
list->chunk_count += 1;
|
||||||
|
}
|
||||||
|
RDIM_InlineSite *result = &n->v[n->count];
|
||||||
|
result->chunk = n;
|
||||||
|
n->count += 1;
|
||||||
|
list->total_count += 1;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
RDI_PROC RDI_U64
|
||||||
|
rdim_idx_from_inline_site(RDIM_InlineSite *inline_site)
|
||||||
|
{
|
||||||
|
RDI_U64 idx = 0;
|
||||||
|
if(inline_site != 0 && inline_site->chunk != 0)
|
||||||
|
{
|
||||||
|
idx = inline_site->chunk->base_idx + (inline_site - inline_site->chunk->v) + 1;
|
||||||
|
}
|
||||||
|
return idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
RDI_PROC void
|
||||||
|
rdim_inline_site_chunk_list_concat_in_place(RDIM_InlineSiteChunkList *dst, RDIM_InlineSiteChunkList *to_push)
|
||||||
|
{
|
||||||
|
for(RDIM_InlineSiteChunkNode *n = to_push->first; n != 0; n = n->next)
|
||||||
|
{
|
||||||
|
n->base_idx += dst->total_count;
|
||||||
|
}
|
||||||
|
if(dst->last != 0 && to_push->first != 0)
|
||||||
|
{
|
||||||
|
dst->last->next = to_push->first;
|
||||||
|
dst->last = to_push->last;
|
||||||
|
dst->chunk_count += to_push->chunk_count;
|
||||||
|
dst->total_count += to_push->total_count;
|
||||||
|
}
|
||||||
|
else if(dst->first == 0)
|
||||||
|
{
|
||||||
|
rdim_memcpy_struct(dst, to_push);
|
||||||
|
}
|
||||||
|
rdim_memzero_struct(to_push);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: [Building] Scope Info Building
|
//~ rjf: [Building] Scope Info Building
|
||||||
|
|
||||||
|
|||||||
@@ -778,7 +778,7 @@ struct RDIM_InlineSite
|
|||||||
RDI_U32 call_col_num;
|
RDI_U32 call_col_num;
|
||||||
RDIM_Type *type;
|
RDIM_Type *type;
|
||||||
RDIM_Type *owner;
|
RDIM_Type *owner;
|
||||||
RDIM_LineTable *line_info;
|
RDIM_LineTable *line_table;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct RDIM_InlineSiteChunkNode RDIM_InlineSiteChunkNode;
|
typedef struct RDIM_InlineSiteChunkNode RDIM_InlineSiteChunkNode;
|
||||||
@@ -1157,6 +1157,13 @@ RDI_PROC RDIM_Symbol *rdim_symbol_chunk_list_push(RDIM_Arena *arena, RDIM_Symbol
|
|||||||
RDI_PROC RDI_U64 rdim_idx_from_symbol(RDIM_Symbol *symbol);
|
RDI_PROC RDI_U64 rdim_idx_from_symbol(RDIM_Symbol *symbol);
|
||||||
RDI_PROC void rdim_symbol_chunk_list_concat_in_place(RDIM_SymbolChunkList *dst, RDIM_SymbolChunkList *to_push);
|
RDI_PROC void rdim_symbol_chunk_list_concat_in_place(RDIM_SymbolChunkList *dst, RDIM_SymbolChunkList *to_push);
|
||||||
|
|
||||||
|
////////////////////////////////
|
||||||
|
//~ rjf: [Building] Inline Site Info Building
|
||||||
|
|
||||||
|
RDI_PROC RDIM_InlineSite *rdim_inline_site_chunk_list_push(RDIM_Arena *arena, RDIM_InlineSiteChunkList *list, RDI_U64 cap);
|
||||||
|
RDI_PROC RDI_U64 rdim_idx_from_inline_site(RDIM_InlineSite *inline_site);
|
||||||
|
RDI_PROC void rdim_inline_site_chunk_list_concat_in_place(RDIM_InlineSiteChunkList *dst, RDIM_InlineSiteChunkList *to_push);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ rjf: [Building] Scope Info Building
|
//~ rjf: [Building] Scope Info Building
|
||||||
|
|
||||||
|
|||||||
@@ -3436,6 +3436,20 @@ p2r_convert(Arena *arena, P2R_User2Convert *in)
|
|||||||
link_name_map = &link_name_map__in_progress;
|
link_name_map = &link_name_map__in_progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////
|
||||||
|
//- rjf: join unit conversion & src file & line table tasks
|
||||||
|
//
|
||||||
|
RDIM_UnitChunkList all_units = {0};
|
||||||
|
RDIM_SrcFileChunkList all_src_files = {0};
|
||||||
|
RDIM_LineTableChunkList all_line_tables = {0};
|
||||||
|
ProfScope("join unit conversion & src file tasks")
|
||||||
|
{
|
||||||
|
P2R_UnitConvertOut *out = ts_join_struct(unit_convert_ticket, max_U64, P2R_UnitConvertOut);
|
||||||
|
all_units = out->units;
|
||||||
|
all_src_files = out->src_files;
|
||||||
|
all_line_tables = out->line_tables;
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
//- rjf: produce symbols from all streams
|
//- rjf: produce symbols from all streams
|
||||||
//
|
//
|
||||||
@@ -3443,6 +3457,7 @@ p2r_convert(Arena *arena, P2R_User2Convert *in)
|
|||||||
RDIM_SymbolChunkList all_global_variables = {0};
|
RDIM_SymbolChunkList all_global_variables = {0};
|
||||||
RDIM_SymbolChunkList all_thread_variables = {0};
|
RDIM_SymbolChunkList all_thread_variables = {0};
|
||||||
RDIM_ScopeChunkList all_scopes = {0};
|
RDIM_ScopeChunkList all_scopes = {0};
|
||||||
|
RDIM_InlineSiteChunkList all_inline_sites = {0};
|
||||||
ProfScope("produce symbols from all streams")
|
ProfScope("produce symbols from all streams")
|
||||||
{
|
{
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
@@ -3493,24 +3508,11 @@ p2r_convert(Arena *arena, P2R_User2Convert *in)
|
|||||||
rdim_symbol_chunk_list_concat_in_place(&all_global_variables, &out->global_variables);
|
rdim_symbol_chunk_list_concat_in_place(&all_global_variables, &out->global_variables);
|
||||||
rdim_symbol_chunk_list_concat_in_place(&all_thread_variables, &out->thread_variables);
|
rdim_symbol_chunk_list_concat_in_place(&all_thread_variables, &out->thread_variables);
|
||||||
rdim_scope_chunk_list_concat_in_place(&all_scopes, &out->scopes);
|
rdim_scope_chunk_list_concat_in_place(&all_scopes, &out->scopes);
|
||||||
|
rdim_inline_site_chunk_list_concat_in_place(&all_inline_sites,&out->inline_sites);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
|
||||||
//- rjf: join unit conversion & src file & line table tasks
|
|
||||||
//
|
|
||||||
RDIM_UnitChunkList all_units = {0};
|
|
||||||
RDIM_SrcFileChunkList all_src_files = {0};
|
|
||||||
RDIM_LineTableChunkList all_line_tables = {0};
|
|
||||||
ProfScope("join unit conversion & src file tasks")
|
|
||||||
{
|
|
||||||
P2R_UnitConvertOut *out = ts_join_struct(unit_convert_ticket, max_U64, P2R_UnitConvertOut);
|
|
||||||
all_units = out->units;
|
|
||||||
all_src_files = out->src_files;
|
|
||||||
all_line_tables = out->line_tables;
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
//- rjf: types pass 5: join UDT build tasks
|
//- rjf: types pass 5: join UDT build tasks
|
||||||
//
|
//
|
||||||
@@ -3537,6 +3539,7 @@ p2r_convert(Arena *arena, P2R_User2Convert *in)
|
|||||||
out->bake_params.thread_variables = all_thread_variables;
|
out->bake_params.thread_variables = all_thread_variables;
|
||||||
out->bake_params.procedures = all_procedures;
|
out->bake_params.procedures = all_procedures;
|
||||||
out->bake_params.scopes = all_scopes;
|
out->bake_params.scopes = all_scopes;
|
||||||
|
out->bake_params.inline_sites = all_inline_sites;
|
||||||
}
|
}
|
||||||
|
|
||||||
scratch_end(scratch);
|
scratch_end(scratch);
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ struct P2R_SymbolStreamConvertOut
|
|||||||
RDIM_SymbolChunkList global_variables;
|
RDIM_SymbolChunkList global_variables;
|
||||||
RDIM_SymbolChunkList thread_variables;
|
RDIM_SymbolChunkList thread_variables;
|
||||||
RDIM_ScopeChunkList scopes;
|
RDIM_ScopeChunkList scopes;
|
||||||
|
RDIM_InlineSiteChunkList inline_sites;
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user