Skip to content

Commit 1e0b8c9

Browse files
qdaomingFyko
authored andcommitted
src: dump isolate stats when process exits
When process exits, dump v8 isolate's internal stats for performance evaluation and debugging. It fixed the incorrect profiling log output when running V8's builtin PGO profiling for node.js service type application,which exits by user pressing CTRL+C etc. keys. PR-URL: nodejs#44534 Reviewed-By: Anna Henningsen <[email protected]>
1 parent cf4a4c1 commit 1e0b8c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/api/environment.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,7 @@ ThreadId AllocateEnvironmentThreadId() {
766766
void DefaultProcessExitHandler(Environment* env, int exit_code) {
767767
env->set_can_call_into_js(false);
768768
env->stop_sub_worker_contexts();
769+
env->isolate()->DumpAndResetStats();
769770
DisposePlatform();
770771
uv_library_shutdown();
771772
exit(exit_code);

0 commit comments

Comments
 (0)