From: John Benediktsson Date: Fri, 14 Aug 2020 17:27:54 +0000 (-0700) Subject: vm: add some allocates memory comments. X-Git-Tag: 0.99~3123 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=e1085ffef493106caae072eb5cb59aef6e5bb9f6 vm: add some allocates memory comments. --- diff --git a/vm/sampling_profiler.cpp b/vm/sampling_profiler.cpp index d7bb06677a..4bf74729cb 100644 --- a/vm/sampling_profiler.cpp +++ b/vm/sampling_profiler.cpp @@ -59,7 +59,7 @@ void profiling_sample::clear_counts() volatile { atomic::fence(); } -// Allocates memory (sample_callstacks2->add) +// Allocates memory void factor_vm::record_sample(bool prolog_p) { profiling_sample result = current_sample.record_counts(); if (result.empty()) { @@ -92,6 +92,7 @@ void factor_vm::record_sample(bool prolog_p) { samples.push_back(result); } +// Allocates memory void factor_vm::set_sampling_profiler(fixnum rate) { bool running_p = atomic::load(&sampling_profiler_p); if (rate > 0 && !running_p) @@ -100,6 +101,7 @@ void factor_vm::set_sampling_profiler(fixnum rate) { end_sampling_profiler(); } +// Allocates memory void factor_vm::start_sampling_profiler(fixnum rate) { special_objects[OBJ_SAMPLE_CALLSTACKS] = tag(allot_growarr()); samples_per_second = rate; @@ -118,6 +120,7 @@ void factor_vm::end_sampling_profiler() { record_sample(false); } +// Allocates memory void factor_vm::primitive_sampling_profiler() { set_sampling_profiler(to_fixnum(ctx->pop())); }