profiler now fixed in wrapper also

This commit is contained in:
Victor Olin 2023-05-01 15:58:20 +02:00
parent 1741281fd8
commit a4413e55f3
6 changed files with 41 additions and 15 deletions

View file

@ -45,4 +45,19 @@ void cheap_set_profiler(cheap_t *cheap, bool mode)
GC::Heap *heap = static_cast<GC::Heap *>(cheap->obj);
heap->set_profiler(mode);
}
void cheap_profiler_log_options(cheap_t *cheap, unsigned long flags)
{
GC::Heap *heap = static_cast<GC::Heap *>(cheap->obj);
GC::RecordOption cast_flag;
if (flags == FuncCallsOnly)
cast_flag = GC::FunctionCalls;
else if (flags == ChunkOpsOnly)
cast_flag = GC::ChunkOps;
else
cast_flag = GC::AllOps;
heap->set_profiler_log_options(cast_flag);
}