Started working on a custom profiler

This commit is contained in:
Victor Olin 2023-02-28 18:44:07 +01:00
parent 4f9aaaf8b4
commit 137687e446
8 changed files with 158 additions and 28 deletions

View file

@ -141,12 +141,7 @@ namespace GC {
// get current stack
auto stack_bottom = reinterpret_cast<uintptr_t *>(__builtin_frame_address(0));
// fix this block, it's nästy
uintptr_t *stack_top;
if (heap->m_stack_top != nullptr)
stack_top = heap->m_stack_top;
else
stack_top = (uintptr_t *)0; // temporary
uintptr_t *stack_top = heap->m_stack_top != nullptr ? heap->m_stack_top : (uintptr_t *)0;
auto work_list = heap->m_allocated_chunks;
mark(stack_bottom, stack_top, work_list);