Skip to content

[PROF-7307] Enable allocation counting feature by default for some Ruby 3 versions#3176

Merged
ivoanjo merged 1 commit into
masterfrom
ivoanjo/prof-7307-enable-allocation-counting-fixed-ruby-3
Oct 3, 2023
Merged

[PROF-7307] Enable allocation counting feature by default for some Ruby 3 versions#3176
ivoanjo merged 1 commit into
masterfrom
ivoanjo/prof-7307-enable-allocation-counting-fixed-ruby-3

Conversation

@ivoanjo

@ivoanjo ivoanjo commented Oct 2, 2023

Copy link
Copy Markdown
Member

What does this PR do?

This PR enables the Profiler's allocation_counting_enabled feature by default for some Ruby 3 versions.

(This feature depends on the profiler itself being enabled).

TL;DR we were already enabling this feature by default on Ruby 2, but did not do it on Ruby 3 because of a VM bug
( https://bugs.ruby-lang.org/issues/18464 ).

Now that this VM bug has been fixed for some Ruby versions (3.1.4, 3.2.3, 3.3.0), we can enable it by default again.

Motivation:

The allocation counting feature is required to enable other features in the future (including allocation profiling) and thus we want to allow as many customers as possible to have it.

Additional Notes:

There's a second annoying VM bug that can also break allocation_counting_enabled (https://bugs.ruby-lang.org/issues/19112) but since that bug doesn't cause a VM crash and only makes it so that data collection stops for this feature, I think we can live with it for now.

I'm also reaching out through some contacts to see if we can get the other bug fixed soon (and possibly backported).

How to test the change?

Change includes test coverage.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

…by 3 versions

**What does this PR do?**

This PR enables the Profiler's `allocation_counting_enabled` feature
by default for some Ruby 3 versions.

(This feature depends on the profiler itself being enabled).

TL;DR we were already enabling this feature by default on Ruby 2, but
did not do it on Ruby 3 because of a VM bug
( https://bugs.ruby-lang.org/issues/18464 ).

Now that this VM bug has been fixed for some Ruby versions
(3.1.4, 3.2.3, 3.3.0), we can enable it by default again.

**Motivation:**

The allocation counting feature is required to enable other
features in the future (including allocation profiling) and thus
we want to allow as many customers as possible to have it.

**Additional Notes:**

There's a second annoying VM bug that can also break
`allocation_counting_enabled` (https://bugs.ruby-lang.org/issues/19112)
but since that bug doesn't cause a VM crash and only makes it so that
data collection stops for this feature, I think we can live with it
for now.

I'm also reaching out through some contacts to see if we can get the
other bug fixed soon (and possibly backported).

**How to test the change?**

Change includes test coverage.
@ivoanjo
ivoanjo requested a review from a team as a code owner October 2, 2023 13:09
@github-actions github-actions Bot added the core Involves Datadog core libraries label Oct 2, 2023
@codecov-commenter

codecov-commenter commented Oct 2, 2023

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.14%. Comparing base (62e6c52) to head (578baad).
⚠️ Report is 5298 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3176      +/-   ##
==========================================
- Coverage   98.14%   98.14%   -0.01%     
==========================================
  Files        1247     1247              
  Lines       71713    71724      +11     
  Branches     3340     3338       -2     
==========================================
+ Hits        70381    70390       +9     
- Misses       1332     1334       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ivoanjo
ivoanjo merged commit 5147774 into master Oct 3, 2023
@ivoanjo
ivoanjo deleted the ivoanjo/prof-7307-enable-allocation-counting-fixed-ruby-3 branch October 3, 2023 13:51
@github-actions github-actions Bot added this to the 1.15.0 milestone Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Involves Datadog core libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants