diff --git a/vm/errors.cpp b/vm/errors.cpp index 7ed28babba..870f851958 100755 --- a/vm/errors.cpp +++ b/vm/errors.cpp @@ -177,6 +177,7 @@ void factor_vm::enqueue_safepoint_sample() FACTOR_ATOMIC_ADD(&safepoint_sample_count, 1); if (current_gc) FACTOR_ATOMIC_ADD(&safepoint_gc_sample_count, 1); + code->guard_safepoint(); } } diff --git a/vm/primitives.hpp b/vm/primitives.hpp index 31845a2122..36de59d089 100644 --- a/vm/primitives.hpp +++ b/vm/primitives.hpp @@ -37,6 +37,7 @@ namespace factor _(callstack_for) \ _(callstack_to_array) \ _(check_datastack) \ + _(clear_samples) \ _(clone) \ _(code_blocks) \ _(code_room) \ @@ -90,6 +91,7 @@ namespace factor _(ftell) \ _(full_gc) \ _(fwrite) \ + _(get_samples) \ _(identity_hashcode) \ _(innermost_stack_frame_executing) \ _(innermost_stack_frame_scan) \