summaryrefslogtreecommitdiff
path: root/transient_heap.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-07-29 17:45:02 +0900
committerKoichi Sasada <ko1@atdot.net>2020-07-29 17:45:02 +0900
commitdd6f5aba0e07c6e65cad026317d1a77dbb72f56e (patch)
treecf1fd6d1290adf3b5ac2a0a8115f2aa1b6abe08d /transient_heap.c
parent520a734ad9c7348f4e4858ee24640f42c88fd389 (diff)
add debug output.
Diffstat (limited to 'transient_heap.c')
-rw-r--r--transient_heap.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/transient_heap.c b/transient_heap.c
index 3c1d9a3986..c626f8d6b8 100644
--- a/transient_heap.c
+++ b/transient_heap.c
@@ -732,9 +732,24 @@ transient_heap_block_evacuate(struct transient_heap* theap, struct transient_hea
}
}
+static const char *
+transient_heap_status_cstr(enum transient_heap_status status)
+{
+ switch (status) {
+ case transient_heap_none: return "none";
+ case transient_heap_marking: return "marking";
+ case transient_heap_escaping: return "escaping";
+ }
+ return NULL; // unreachable;
+}
+
static void
transient_heap_update_status(struct transient_heap* theap, enum transient_heap_status status)
{
+ RUBY_DEBUG_LOG("%s -> %s",
+ transient_heap_status_cstr(theap->status),
+ transient_heap_status_cstr(status));
+
TH_ASSERT(theap->status != status);
theap->status = status;
}
@@ -873,6 +888,8 @@ rb_transient_heap_update_references(void)
void
rb_transient_heap_start_marking(int full_marking)
{
+ RUBY_DEBUG_LOG("full?:%d", full_marking);
+
struct transient_heap* theap = transient_heap_get();
if (TRANSIENT_HEAP_DEBUG >= 1) fprintf(stderr, "!! rb_transient_heap_start_marking objects:%d blocks:%d promtoed:%d full_marking:%d\n",
@@ -921,6 +938,8 @@ rb_transient_heap_start_marking(int full_marking)
void
rb_transient_heap_finish_marking(void)
{
+ RUBY_DEBUG_LOG("", 0);
+
struct transient_heap* theap = transient_heap_get();
if (TRANSIENT_HEAP_DEBUG >= 1) fprintf(stderr, "!! rb_transient_heap_finish_marking objects:%d, marked:%d\n",