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

[PROF-10422] Add GVL profiling as a preview feature #3929

Merged
merged 42 commits into from
Sep 20, 2024

Commits on Sep 18, 2024

  1. Bootstrap gvl profiling hook

    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    e53c00f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a91954 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1ee127f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f5bcd4f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    31ce66d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2f3dd97 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    339e18d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a8f771b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e655976 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3d6e238 View commit details
    Browse the repository at this point in the history
  11. Add default arguments handling to _native_sample

    This test helper method was getting very annoying to maintain every
    time we needed to test new features.
    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    83e38c6 View commit details
    Browse the repository at this point in the history
  12. Switch from hash to array to hopefully avoid flakiness

    The flakiness on this spec showed up again when I slightly refactored
    the `Collectors::Stack::Testing._native_sample` method but goes away if
    we use an array.
    
    I really dislike all the handwaving around this, but I'm not sure what
    we can do better in this case.
    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    135b555 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    bf4d86d View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3db9e5f View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    30a245b View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8f61036 View commit details
    Browse the repository at this point in the history
  17. Add validation that input is thread

    We're using low-level Ruby APIs that don't look before they jump, so
    let's be careful to do our own validation to avoid crashes.
    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    206b880 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    e3c1138 View commit details
    Browse the repository at this point in the history
  19. Extract out ruby version for GVL profiling specs

    It occurs to me that I'm sprinkling a lot of conditionals all over the
    place, and when we want to support 3.2 we'll need to find all of them
    and if we miss some there won't be anything reminding us it's missing.
    
    So by extracting the version to a single location, we'll bump it once
    and all specs that need to work for 3.2 will be run.
    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    1bf6014 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    7faab42 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    f9c919a View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    22a54ae View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    a6f6646 View commit details
    Browse the repository at this point in the history
  24. Linting fixes

    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    e6093c8 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    e0ceba5 View commit details
    Browse the repository at this point in the history
  26. Minor spec cleanups

    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    147f227 View commit details
    Browse the repository at this point in the history
  27. Refactor: Introduce ThreadContext.for_testing constructor

    So far in the profiler, we've been avoiding adding defaults to keyword
    arguments that are expected to be set in production as, well, those
    defaults won't match what happens in production (they'll get
    overridden).
    
    This is all fine, but quite annoying when we use our components
    piecemeal for benchmarking and testing, since adding any new arguments
    means modifying a gazillion places in the codebase to start passing in
    that argument.
    
    To solve this, let's introduce a `for_testing` helper method that
    provides defaults that we often use for testing, and that then calls
    into the regular constructor.
    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    6101052 View commit details
    Browse the repository at this point in the history
  28. Make waiting_for_gvl_threshold_ns configurable instead of being har…

    …dcoded
    
    This setting is going to be the main overhead lever for the Waiting for
    GVL feature. Having it configurable will allow us to play with it and
    better find good defaults.
    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    524e9d1 View commit details
    Browse the repository at this point in the history
  29. Convert CpuAndWallTimeWorker.new to use keyword arguments

    This method has way too many positional arguments, let's try to avoid
    this footgun by using keyword arguments instead.
    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    0c7c1b5 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    d05beb3 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    67dc4e7 View commit details
    Browse the repository at this point in the history
  32. Add testing for enabling the GVL profiling hook

    + a small refactor for skipping GVL profiling specs on legacy Rubies
    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    491d5dc View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    39a0d3d View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    ceda29e View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    6787399 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    26914e1 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    bbebed3 View commit details
    Browse the repository at this point in the history
  38. Minor linting autofix

    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    90f1aa3 View commit details
    Browse the repository at this point in the history
  39. Fix skipping on legacy Rubies not stopping the profiler

    This skip was only called after a previous before started the profiler,
    so this left the test suite in an incorrect state.
    ivoanjo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    567a98c View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    ea2bb1b View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    82aa51a View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. Configuration menu
    Copy the full SHA
    c443893 View commit details
    Browse the repository at this point in the history