Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 1eb1e0a

Browse files
bnoordhuistrevnorris
authored andcommitted
src: reduce cpu profiler overhead
Reduce the overhead of the CPU profiler by suppressing SIGPROF signals when sleeping / polling for events. Avoids unnecessary wakeups when the CPU profiler is active. Depends on https://github.com/libuv/libuv#15. Ref: strongloop/strong-agent#3 PR-URL: #8791 Reviewed-by: Trevor Norris <[email protected]>
1 parent f75a8ad commit 1eb1e0a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/node.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2962,6 +2962,7 @@ char** Init(int argc, char *argv[]) {
29622962
V8::SetFlagsFromCommandLine(&v8argc, v8argv, false);
29632963

29642964
#ifdef __POSIX__
2965+
uv_loop_configure(uv_default_loop(), UV_LOOP_BLOCK_SIGNAL, SIGPROF);
29652966
// Ignore SIGPIPE
29662967
RegisterSignalHandler(SIGPIPE, SIG_IGN);
29672968
RegisterSignalHandler(SIGINT, SignalExit);

0 commit comments

Comments
 (0)