Skip to content

Commit eaf2ffc

Browse files
qdaomingjuanarbol
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: #44534 Reviewed-By: Anna Henningsen <[email protected]>
1 parent 8d259e6 commit eaf2ffc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/api/environment.cc

+1
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ ThreadId AllocateEnvironmentThreadId() {
761761
void DefaultProcessExitHandler(Environment* env, int exit_code) {
762762
env->set_can_call_into_js(false);
763763
env->stop_sub_worker_contexts();
764+
env->isolate()->DumpAndResetStats();
764765
DisposePlatform();
765766
uv_library_shutdown();
766767
exit(exit_code);

0 commit comments

Comments
 (0)