summaryrefslogtreecommitdiff
path: root/deps/v8/src/debug-debugger.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-11-27 07:15:54 +0100
committerTrevor Norris <trev.norris@gmail.com>2015-01-12 16:49:07 -0800
commit6ebd85e10535dfaa9181842fe73834e51d4d3e6c (patch)
tree8365482db9da3ce70ca4a84d69a8b4bd392c3404 /deps/v8/src/debug-debugger.js
parentfe2019699add29bd903679b56498eef97dda2b4e (diff)
downloadnode-6ebd85e10535dfaa9181842fe73834e51d4d3e6c.tar.gz
v8: don't busy loop in cpu profiler thread
Reduce the overhead of the CPU profiler by replacing sched_yield() with nanosleep() in V8's tick event processor thread. The former only yields the CPU when there is another process scheduled on the same CPU. Before this commit, the thread would effectively busy loop and consume 100% CPU time. By forcing a one nanosecond sleep period rounded up to the task scheduler's granularity (about 50 us on Linux), CPU usage for the processor thread now hovers around 10-20% for a busy application. PR-URL: https://github.com/joyent/node/pull/8789 Ref: https://github.com/strongloop/strong-agent/issues/3 Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'deps/v8/src/debug-debugger.js')
0 files changed, 0 insertions, 0 deletions