From 1eb1e0a9af9b5f0782f4b877f6e50247e0276ba1 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 27 Nov 2014 09:10:21 +0100 Subject: [PATCH] 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 --- src/node.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node.cc b/src/node.cc index e80c1a573f..6d4d212bfb 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);