mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 04:48:40 +00:00
adjust default task sizes in raddbgi_from_pdb
This commit is contained in:
+7
-4
@@ -2,7 +2,7 @@
|
|||||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ MSF Parser Function
|
//~ rjf: MSF Parser Functions
|
||||||
|
|
||||||
internal MSF_Parsed*
|
internal MSF_Parsed*
|
||||||
msf_parsed_from_data(Arena *arena, String8 msf_data)
|
msf_parsed_from_data(Arena *arena, String8 msf_data)
|
||||||
@@ -199,7 +199,8 @@ msf_parsed_from_data(Arena *arena, String8 msf_data)
|
|||||||
U32 entry_cursor = all_stream_entries_off;
|
U32 entry_cursor = all_stream_entries_off;
|
||||||
U32 index_cursor = all_indices_off;
|
U32 index_cursor = all_indices_off;
|
||||||
String8 *stream_ptr = streams;
|
String8 *stream_ptr = streams;
|
||||||
for (U32 i = 0; i < stream_count; i += 1){
|
for (U32 i = 0; i < stream_count; i += 1)
|
||||||
|
{
|
||||||
// read stream size
|
// read stream size
|
||||||
U32 stream_size_raw = *(U32*)(directory_buf + entry_cursor);
|
U32 stream_size_raw = *(U32*)(directory_buf + entry_cursor);
|
||||||
if (stream_size_raw == 0xffffffff){
|
if (stream_size_raw == 0xffffffff){
|
||||||
@@ -274,9 +275,11 @@ msf_parsed_from_data(Arena *arena, String8 msf_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal String8
|
internal String8
|
||||||
msf_data_from_stream(MSF_Parsed *msf, MSF_StreamNumber sn){
|
msf_data_from_stream(MSF_Parsed *msf, MSF_StreamNumber sn)
|
||||||
|
{
|
||||||
String8 result = {0};
|
String8 result = {0};
|
||||||
if (sn < msf->stream_count){
|
if(sn < msf->stream_count)
|
||||||
|
{
|
||||||
result = msf->streams[sn];
|
result = msf->streams[sn];
|
||||||
}
|
}
|
||||||
return(result);
|
return(result);
|
||||||
|
|||||||
+15
-10
@@ -5,7 +5,7 @@
|
|||||||
#define MSF_H
|
#define MSF_H
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ MSF Format Types
|
//~ rjf: MSF Format Types
|
||||||
|
|
||||||
#define MSF_INVALID_STREAM_NUMBER 0xFFFF
|
#define MSF_INVALID_STREAM_NUMBER 0xFFFF
|
||||||
typedef U16 MSF_StreamNumber;
|
typedef U16 MSF_StreamNumber;
|
||||||
@@ -17,23 +17,27 @@ static char msf_msf70_magic[] = "Microsoft C/C++ MSF 7.00\r\n\032DS\0\0";
|
|||||||
#define MSF_MSF70_MAGIC_SIZE 32
|
#define MSF_MSF70_MAGIC_SIZE 32
|
||||||
#define MSF_MAX_MAGIC_SIZE 44
|
#define MSF_MAX_MAGIC_SIZE 44
|
||||||
|
|
||||||
typedef struct MSF_Header20{
|
typedef struct MSF_Header20 MSF_Header20;
|
||||||
|
struct MSF_Header20
|
||||||
|
{
|
||||||
U32 block_size;
|
U32 block_size;
|
||||||
U16 free_block_map_block;
|
U16 free_block_map_block;
|
||||||
U16 block_count;
|
U16 block_count;
|
||||||
U32 directory_size;
|
U32 directory_size;
|
||||||
U32 unknown;
|
U32 unknown;
|
||||||
U16 directory_map;
|
U16 directory_map;
|
||||||
} MSF_Header20;
|
};
|
||||||
|
|
||||||
typedef struct MSF_Header70{
|
typedef struct MSF_Header70 MSF_Header70;
|
||||||
|
struct MSF_Header70
|
||||||
|
{
|
||||||
U32 block_size;
|
U32 block_size;
|
||||||
U32 free_block_map_block;
|
U32 free_block_map_block;
|
||||||
U32 block_count;
|
U32 block_count;
|
||||||
U32 directory_size;
|
U32 directory_size;
|
||||||
U32 unknown;
|
U32 unknown;
|
||||||
U32 directory_super_map;
|
U32 directory_super_map;
|
||||||
} MSF_Header70;
|
};
|
||||||
|
|
||||||
// magic(20) + header(20) = 44 + 20 = 64
|
// magic(20) + header(20) = 44 + 20 = 64
|
||||||
// magic(70) + header(70) = 32 + 24 = 56
|
// magic(70) + header(70) = 32 + 24 = 56
|
||||||
@@ -41,18 +45,19 @@ typedef struct MSF_Header70{
|
|||||||
#define MSF_MIN_SIZE 64
|
#define MSF_MIN_SIZE 64
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ MSF Parser Helper Types
|
//~ rjf: MSF Parser Helper Types
|
||||||
|
|
||||||
typedef struct MSF_Parsed{
|
typedef struct MSF_Parsed MSF_Parsed;
|
||||||
|
struct MSF_Parsed
|
||||||
|
{
|
||||||
String8 *streams;
|
String8 *streams;
|
||||||
U64 stream_count;
|
U64 stream_count;
|
||||||
|
|
||||||
U64 block_size;
|
U64 block_size;
|
||||||
U64 block_count;
|
U64 block_count;
|
||||||
} MSF_Parsed;
|
};
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
//~ MSF Parser Function
|
//~ rjf: MSF Parser Functions
|
||||||
|
|
||||||
internal MSF_Parsed* msf_parsed_from_data(Arena *arena, String8 msf_data);
|
internal MSF_Parsed* msf_parsed_from_data(Arena *arena, String8 msf_data);
|
||||||
internal String8 msf_data_from_stream(MSF_Parsed *msf, MSF_StreamNumber sn);
|
internal String8 msf_data_from_stream(MSF_Parsed *msf, MSF_StreamNumber sn);
|
||||||
|
|||||||
@@ -2921,7 +2921,7 @@ p2r_convert(Arena *arena, P2R_User2Convert *in)
|
|||||||
itype_fwd_map = push_array(arena, CV_TypeId, (U64)itype_opl);
|
itype_fwd_map = push_array(arena, CV_TypeId, (U64)itype_opl);
|
||||||
|
|
||||||
//- rjf: kick off tasks to fill forward resolution map
|
//- rjf: kick off tasks to fill forward resolution map
|
||||||
U64 task_size_itypes = 4096;
|
U64 task_size_itypes = 1024;
|
||||||
U64 tasks_count = ((U64)itype_opl+(task_size_itypes-1))/task_size_itypes;
|
U64 tasks_count = ((U64)itype_opl+(task_size_itypes-1))/task_size_itypes;
|
||||||
P2R_ITypeFwdMapFillIn *tasks_inputs = push_array(scratch.arena, P2R_ITypeFwdMapFillIn, tasks_count);
|
P2R_ITypeFwdMapFillIn *tasks_inputs = push_array(scratch.arena, P2R_ITypeFwdMapFillIn, tasks_count);
|
||||||
TS_Ticket *tasks_tickets = push_array(scratch.arena, TS_Ticket, tasks_count);
|
TS_Ticket *tasks_tickets = push_array(scratch.arena, TS_Ticket, tasks_count);
|
||||||
@@ -2960,7 +2960,7 @@ p2r_convert(Arena *arena, P2R_User2Convert *in)
|
|||||||
itype_chains = push_array(arena, P2R_TypeIdChain *, (U64)itype_opl);
|
itype_chains = push_array(arena, P2R_TypeIdChain *, (U64)itype_opl);
|
||||||
|
|
||||||
//- rjf: kick off tasks to fill itype chain table
|
//- rjf: kick off tasks to fill itype chain table
|
||||||
U64 task_size_itypes = 4096;
|
U64 task_size_itypes = 1024;
|
||||||
U64 tasks_count = ((U64)itype_opl+(task_size_itypes-1))/task_size_itypes;
|
U64 tasks_count = ((U64)itype_opl+(task_size_itypes-1))/task_size_itypes;
|
||||||
P2R_ITypeChainBuildIn *tasks_inputs = push_array(scratch.arena, P2R_ITypeChainBuildIn, tasks_count);
|
P2R_ITypeChainBuildIn *tasks_inputs = push_array(scratch.arena, P2R_ITypeChainBuildIn, tasks_count);
|
||||||
TS_Ticket *tasks_tickets = push_array(scratch.arena, TS_Ticket, tasks_count);
|
TS_Ticket *tasks_tickets = push_array(scratch.arena, TS_Ticket, tasks_count);
|
||||||
@@ -3461,7 +3461,7 @@ p2r_convert(Arena *arena, P2R_User2Convert *in)
|
|||||||
////////////////////////////
|
////////////////////////////
|
||||||
//- rjf: kick off all symbol conversion tasks
|
//- rjf: kick off all symbol conversion tasks
|
||||||
//
|
//
|
||||||
U64 global_stream_subdivision_tasks_count = (sym->sym_ranges.count+65535)/65536;
|
U64 global_stream_subdivision_tasks_count = (sym->sym_ranges.count+16383)/16384;
|
||||||
U64 global_stream_syms_per_task = sym->sym_ranges.count/global_stream_subdivision_tasks_count;
|
U64 global_stream_syms_per_task = sym->sym_ranges.count/global_stream_subdivision_tasks_count;
|
||||||
U64 tasks_count = comp_unit_count + global_stream_subdivision_tasks_count;
|
U64 tasks_count = comp_unit_count + global_stream_subdivision_tasks_count;
|
||||||
P2R_SymbolStreamConvertIn *tasks_inputs = push_array(scratch.arena, P2R_SymbolStreamConvertIn, tasks_count);
|
P2R_SymbolStreamConvertIn *tasks_inputs = push_array(scratch.arena, P2R_SymbolStreamConvertIn, tasks_count);
|
||||||
|
|||||||
Reference in New Issue
Block a user