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 juanarbol committed Oct 11, 2022
1 parent 8d259e6 commit eaf2ffc
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 @@ -761,6 +761,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 eaf2ffc

Please sign in to comment.