mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-07 14:28:40 +00:00
adjust spall usage code - still not generating multi-thread events correctly...
This commit is contained in:
@@ -19,7 +19,7 @@ main_thread_base_entry_point(int arguments_count, char **arguments)
|
|||||||
|
|
||||||
//- rjf: set up spall
|
//- rjf: set up spall
|
||||||
#if PROFILE_SPALL
|
#if PROFILE_SPALL
|
||||||
spall_profile = spall_init_file("spall_capture", 1);
|
spall_profile = spall_init_file_ex("spall_capture", 1, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//- rjf: parse command line
|
//- rjf: parse command line
|
||||||
|
|||||||
@@ -5,6 +5,13 @@
|
|||||||
internal inline void
|
internal inline void
|
||||||
spall_begin(char *fmt, ...)
|
spall_begin(char *fmt, ...)
|
||||||
{
|
{
|
||||||
|
if(spall_buffer.data == 0)
|
||||||
|
{
|
||||||
|
spall_buffer.length = MB(1);
|
||||||
|
spall_buffer.data = os_reserve(spall_buffer.length);
|
||||||
|
os_commit(spall_buffer.data, spall_buffer.length);
|
||||||
|
spall_buffer_init(&spall_profile, &spall_buffer);
|
||||||
|
}
|
||||||
if(spall_pid == 0)
|
if(spall_pid == 0)
|
||||||
{
|
{
|
||||||
spall_pid = os_get_process_info()->pid;
|
spall_pid = os_get_process_info()->pid;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ scratch_end(scratch); \
|
|||||||
//~ rjf: Spall Profile Defines
|
//~ rjf: Spall Profile Defines
|
||||||
|
|
||||||
#if PROFILE_SPALL
|
#if PROFILE_SPALL
|
||||||
global U64 spall_capturing = 1;
|
global U64 spall_capturing = 0;
|
||||||
global SpallProfile spall_profile = {0};
|
global SpallProfile spall_profile = {0};
|
||||||
thread_static SpallBuffer spall_buffer = {0};
|
thread_static SpallBuffer spall_buffer = {0};
|
||||||
thread_static U32 spall_tid = 0;
|
thread_static U32 spall_tid = 0;
|
||||||
@@ -82,7 +82,7 @@ internal inline void spall_begin(char *fmt, ...);
|
|||||||
# define ProfTick(...)
|
# define ProfTick(...)
|
||||||
# define ProfIsCapturing(...) (!!spall_capturing)
|
# define ProfIsCapturing(...) (!!spall_capturing)
|
||||||
# define ProfBeginCapture(...) (spall_capturing = 1)
|
# define ProfBeginCapture(...) (spall_capturing = 1)
|
||||||
# define ProfEndCapture(...) (spall_capturing = 0)
|
# define ProfEndCapture(...) (spall_capturing = 0, spall_flush(&spall_profile))
|
||||||
# define ProfThreadName(...)
|
# define ProfThreadName(...)
|
||||||
# define ProfMsg(...)
|
# define ProfMsg(...)
|
||||||
# define ProfBeginLockWait(...)
|
# define ProfBeginLockWait(...)
|
||||||
|
|||||||
@@ -18,11 +18,6 @@ tctx_init_and_equip(TCTX *tctx)
|
|||||||
{
|
{
|
||||||
*arena_ptr = arena_alloc();
|
*arena_ptr = arena_alloc();
|
||||||
}
|
}
|
||||||
#if PROFILE_SPALL
|
|
||||||
spall_buffer.length = MB(1);
|
|
||||||
spall_buffer.data = push_array_no_zero(tctx->arenas[0], U8, spall_buffer.length);
|
|
||||||
spall_buffer_init(&spall_profile, &spall_buffer);
|
|
||||||
#endif
|
|
||||||
tctx_thread_local = tctx;
|
tctx_thread_local = tctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user