Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib,src: remove cpu profiler idle notifier #34010

Closed
wants to merge 2 commits into from

Commits on Jun 22, 2020

  1. lib,src: remove cpu profiler idle notifier

    I added it in commit 57231d5 ("src: notify V8 profiler when we're
    idle") from October 2013 as a stop-gap measure to measure CPU time
    rather than wall clock time, otherwise processes that spend a lot
    of time sleeping in system calls give a false impression of being
    very busy.
    
    That fix is not without drawbacks because the idle flag is set before
    libuv makes I/O callbacks and cleared again after. I/O callbacks can
    result into calls into JS code and executing JS code is as non-idle
    as you can get.
    
    In commit 96ffcb9 ("src: reduce cpu profiler overhead") from January
    2015, I made Node.js block off the SIGPROF signal that V8's CPU profiler
    uses before Node.js goes to sleep. The goal of that commit is to reduce
    the overhead from EINTR system call wakeups but it also has the pleasant
    side effect of fixing what the idle notifier tried to fix.
    
    This commit removes the idle notifier and turns the JS process object
    methods into no-ops.
    
    Fixes: nodejs#19009
    Refs: nodejs#33138
    bnoordhuis committed Jun 22, 2020
    Configuration menu
    Copy the full SHA
    61468b8 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2020

  1. squash! add comment

    bnoordhuis committed Jun 23, 2020
    Configuration menu
    Copy the full SHA
    49951ae View commit details
    Browse the repository at this point in the history