Skip to content

Commit 81ea507

Browse files
qdaomingRafaelGSS
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 <anna@addaleax.net>
1 parent 729dd95 commit 81ea507

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
@@ -768,6 +768,7 @@ ThreadId AllocateEnvironmentThreadId() {
768768
void DefaultProcessExitHandler(Environment* env, int exit_code) {
769769
env->set_can_call_into_js(false);
770770
env->stop_sub_worker_contexts();
771+
env->isolate()->DumpAndResetStats();
771772
DisposePlatform();
772773
uv_library_shutdown();
773774
exit(exit_code);

0 commit comments

Comments
 (0)