Skip to content

Commit

Permalink
src: dump isolate stats when process exits
Browse files Browse the repository at this point in the history
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 <anna@addaleax.net>
  • Loading branch information
qdaoming authored and RafaelGSS committed Sep 26, 2022
1 parent 729dd95 commit 81ea507
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/api/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,7 @@ ThreadId AllocateEnvironmentThreadId() {
void DefaultProcessExitHandler(Environment* env, int exit_code) {
env->set_can_call_into_js(false);
env->stop_sub_worker_contexts();
env->isolate()->DumpAndResetStats();
DisposePlatform();
uv_library_shutdown();
exit(exit_code);
Expand Down

0 comments on commit 81ea507

Please sign in to comment.