Skip to content

Commit d3fd4a9

Browse files
IlyasShabiaduh95
authored andcommitted
worker: heap profile optimizations
PR-URL: #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>
1 parent 231521e commit d3fd4a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_worker.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,8 @@ static bool serializeProfile(Isolate* isolate, std::ostringstream& out_stream) {
11211121
if (!profile) {
11221122
return false;
11231123
}
1124-
JSONWriter writer(out_stream, false);
1124+
profiler->StopSamplingHeapProfiler();
1125+
JSONWriter writer(out_stream, true);
11251126
writer.json_start();
11261127

11271128
writer.json_arraystart("samples");
@@ -1139,7 +1140,6 @@ static bool serializeProfile(Isolate* isolate, std::ostringstream& out_stream) {
11391140
writer.json_objectend();
11401141

11411142
writer.json_end();
1142-
profiler->StopSamplingHeapProfiler();
11431143
return true;
11441144
}
11451145

0 commit comments

Comments
 (0)