From b6e8639302d7322f13dcc6efdc94a106a8cb35c0 Mon Sep 17 00:00:00 2001 From: Timo Paulssen Date: Sun, 18 Feb 2018 19:06:21 +0100 Subject: [PATCH] keep main thread in gen2 mode as the other functions use its tc to allocate objects. --- src/profiler/instrument.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/profiler/instrument.c b/src/profiler/instrument.c index 274dc32ef9..c393cc82ec 100644 --- a/src/profiler/instrument.c +++ b/src/profiler/instrument.c @@ -571,7 +571,6 @@ void MVM_profile_dump_instrumented_data(MVMThreadContext *tc) { MVM_profile_log_exit(tc); fprintf(stderr, "took data from main thread\n"); - MVM_gc_allocate_gen2_default_clear(tc); /* Get all thread's data */ thread = tc->instance->threads; @@ -600,6 +599,7 @@ void MVM_profile_dump_instrumented_data(MVMThreadContext *tc) { } fprintf(stderr, "done taking data\n"); } + MVM_gc_allocate_gen2_default_clear(tc); } /* Dumps data from all threads into an array of per-thread data. */