Skip to content

V8's CpuProfiler uses busy wait on Windows. #170

Description

@hashseed

The reason for that is described in this comment:

// Do not use Sleep on Windows as it is very imprecise.
// Could be up to 16ms jitter, which is unacceptable for the purpose.

This in turn is not acceptable for some APM vendors who run the CpuProfiler in production. For sampling intervals significantly larger than 16ms we should be fine with using Sleep though.

@Hollerberg

Activity

  1. hashseed commented on Feb 22, 2018

    @hashseed
    MemberAuthor
  2. hashseed commented on Feb 22, 2018

    @hashseed
    MemberAuthor

    @Flarna @Hollerberg feel free to have this cherry-picked onto Node.js. I don't think we will backmerge this change in V8 upstream.

  3. Flarna commented on Feb 28, 2018

    @Flarna
    Member

    @hashseed Thanks for the change!
    But I think there is an else missing in current code. Now there is no wait at all for long intervals...

  4. Flarna commented on Jul 9, 2019

    @Flarna
    Member

    Will close this as this is included in NodeJS 10 onwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions