From 27d7e4af532e605213a2acd96d28558693ef7c0c Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Sun, 30 Oct 2011 23:42:36 -0700 Subject: [PATCH] vm: actually collect samples and add primitives... --- vm/errors.cpp | 1 + vm/primitives.hpp | 2 ++ 2 files changed, 3 insertions(+) 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) \