node/deps/v8/tools/gyp
Ben Noordhuis 6ebd85e105 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>
2015-01-12 16:49:07 -08:00
..
v8.gyp v8: don't busy loop in cpu profiler thread 2015-01-12 16:49:07 -08:00