diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-11-27 09:10:21 +0100 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2014-12-17 12:37:30 -0800 |
commit | 1eb1e0a9af9b5f0782f4b877f6e50247e0276ba1 (patch) | |
tree | 18c25b61d11438a517f24d929cefff8f46a5a934 | |
parent | f75a8ad7237f3bbe33d73725805c422f20f391ba (diff) | |
download | node-1eb1e0a9af9b5f0782f4b877f6e50247e0276ba1.tar.gz |
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: https://github.com/strongloop/strong-agent/issues/3
PR-URL: https://github.com/joyent/node/pull/8791
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
-rw-r--r-- | src/node.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node.cc b/src/node.cc index e80c1a573..6d4d212bf 100644 --- a/src/node.cc +++ b/src/node.cc @@ -2962,6 +2962,7 @@ char** Init(int argc, char *argv[]) { V8::SetFlagsFromCommandLine(&v8argc, v8argv, false); #ifdef __POSIX__ + uv_loop_configure(uv_default_loop(), UV_LOOP_BLOCK_SIGNAL, SIGPROF); // Ignore SIGPIPE RegisterSignalHandler(SIGPIPE, SIG_IGN); RegisterSignalHandler(SIGINT, SignalExit); |