profiler improvement

This commit is contained in:
Victor Olin 2023-05-01 15:43:51 +02:00
parent d7ea27e9cd
commit 1741281fd8
7 changed files with 61 additions and 153 deletions

View file

@ -80,6 +80,7 @@ int main() {
GC::Heap::init();
GC::Heap &gc = GC::Heap::the();
gc.set_profiler(true);
GC::Profiler::set_log_options(GC::FunctionCalls);
gc.check_init();
auto stack_start = reinterpret_cast<uintptr_t *>(__builtin_frame_address(0));

View file

@ -52,22 +52,10 @@ void clear_list(Node *head)
}
}
void run_list_test1()
void run_list_test()
{
Node *list_a = create_list(10);
print_list(list_a);
}
void run_list_test2()
{
Node *list_b = create_list(10);
print_list(list_b);
}
void run_list_test3()
{
Node *list_c = create_list(10);
print_list(list_c);
Node *list = create_list(10);
print_list(list);
}
int main()
@ -77,9 +65,8 @@ int main()
heap.set_profiler(true);
GC::Profiler::set_log_options(GC::FunctionCalls);
run_list_test1();
run_list_test2();
run_list_test3();
for (int i = 0; i < 10; i++)
run_list_test();
GC::Heap::dispose();