Skip to content

Commit a81087a

Browse files
committed
worker: heap profile optimizations
1 parent 5e41755 commit a81087a

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)