File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -3587,10 +3587,6 @@ inline void PlatformInit() {
3587
3587
RegisterSignalHandler (SIGINT, SignalExit, true );
3588
3588
RegisterSignalHandler (SIGTERM, SignalExit, true );
3589
3589
3590
- // Block SIGPROF signals when sleeping in epoll_wait/kevent/etc. Avoids the
3591
- // performance penalty of frequent EINTR wakeups when the profiler is running.
3592
- uv_loop_configure (uv_default_loop (), UV_LOOP_BLOCK_SIGNAL, SIGPROF);
3593
-
3594
3590
// Raise the open file descriptor limit.
3595
3591
struct rlimit lim;
3596
3592
if (getrlimit (RLIMIT_NOFILE, &lim) == 0 && lim.rlim_cur != lim.rlim_max ) {
@@ -3674,6 +3670,15 @@ void Init(int* argc,
3674
3670
}
3675
3671
}
3676
3672
3673
+ #ifdef __POSIX__
3674
+ // Block SIGPROF signals when sleeping in epoll_wait/kevent/etc. Avoids the
3675
+ // performance penalty of frequent EINTR wakeups when the profiler is running.
3676
+ // Only do this for v8.log profiling, as it breaks v8::CpuProfiler users.
3677
+ if (v8_is_profiling) {
3678
+ uv_loop_configure (uv_default_loop (), UV_LOOP_BLOCK_SIGNAL, SIGPROF);
3679
+ }
3680
+ #endif
3681
+
3677
3682
#if defined(NODE_HAVE_I18N_SUPPORT)
3678
3683
if (icu_data_dir == nullptr ) {
3679
3684
// if the parameter isn't given, use the env variable.
You can’t perform that action at this time.
0 commit comments