worker: heap profile optimizations

PR-URL: https://github.com/nodejs/node/pull/62201
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
This commit is contained in:
Ilyas Shabi authored and Antoine du Hamel committed 2026-04-10 14:52:23 +02:00
1 parent ace802e59b
commit eee96f7f5d
1 file changed
+2 -2
+2 -2
View File
@@ -1121,7 +1121,8 @@ static bool serializeProfile(Isolate* isolate, std::ostringstream& out_stream) {
if (!profile) {
return false;
}
JSONWriter writer(out_stream, false);
profiler->StopSamplingHeapProfiler();
JSONWriter writer(out_stream, true);
writer.json_start();
writer.json_arraystart("samples");
@@ -1139,7 +1140,6 @@ static bool serializeProfile(Isolate* isolate, std::ostringstream& out_stream) {
writer.json_objectend();
writer.json_end();
profiler->StopSamplingHeapProfiler();
return true;
}