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-9342] Introduce profiler workaround for Ruby Dir interruption bug #3720

Merged
merged 22 commits into from
Jul 2, 2024

Commits on Jun 13, 2024

  1. Expose methods for holding/resuming interruptions

    These will be needed to implement the dir interruption workaround.
    ivoanjo committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    b03696e View commit details
    Browse the repository at this point in the history
  2. Bootstrap setting for controlling dir interruption workaround

    Not yet wired up.
    ivoanjo committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    aeb2db6 View commit details
    Browse the repository at this point in the history
  3. Add monkey patches for affected dir class APIs

    I've separately tested these with ruby-spec, but haven't integrated
    it yet for automated testing. Will do it a follow-up commit.
    ivoanjo committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    88f1164 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3c51234 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2024

  1. Add benchmark for hold/resume interruptions

    For future reference, here's what I get on my local machine:
    
    ```
    ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
    Warming up --------------------------------------
           hold / resume   391.856k i/100ms
    Calculating -------------------------------------
           hold / resume      3.829M (± 1.9%) i/s -     38.402M in  10.033530s
    ```
    ivoanjo committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    1721270 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    42c40b2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    25a96a1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    57e64bf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0e80c77 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    577fdb0 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    43a3e5e View commit details
    Browse the repository at this point in the history
  8. Add nice description to dir interruption workaround setting

    ...that mentions #3450 .
    ivoanjo committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    9152470 View commit details
    Browse the repository at this point in the history
  9. Tweak spec for compatibility with Ruby 2.7

    Looks like the `sort:` was added later, and it wasn't particularly
    critical to what we were testing so I chose to omit it.
    ivoanjo committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    b30ca79 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d6eebe9 View commit details
    Browse the repository at this point in the history
  11. Tweak spec to remove assumption that no signals workaround is disable…

    …d by default
    
    This broke Ruby 2.5, which enables it by default.
    ivoanjo committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    30601a2 View commit details
    Browse the repository at this point in the history
  12. Make rubocop happy

    ivoanjo committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    9ad82fe View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. Tweak naming of functions to clarify that it's signals being held

    The interruptions part is just a consequence of signal delivery.
    ivoanjo committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    8099c94 View commit details
    Browse the repository at this point in the history
  2. Avoid ruby2_keywords and instead have variants for Ruby 2 and 3

    Loic suggested this may provide better compatibility, and it seems
    to make sense given we're monkey patching a quite core Ruby class.
    
    This diff is way easier to review without whitespace. What I did was
    copy/paste the module, remove the `ruby2_keywords`, add `**kwargs` to
    the Ruby 3 variants and clean up any things that don't make sense for
    Ruby 3 (e.g. testing for 2.5 for some methods).
    ivoanjo committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    ba0d6b5 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. Add test to make sure we don't forget to register new profiler benchm…

    …arks
    
    ...which I totally was almost forgetting.
    ivoanjo committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    a6366f9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3501237 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

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

Commits on Jul 2, 2024

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