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

Allow profiler development on arm64 macOS #2573

Merged
merged 1 commit into from
Jan 25, 2023

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Jan 20, 2023

What does this PR do?:

This PR tweaks the ruby platform check prior to compiling the profiling native extension to allow compilation on arm64 macOS.

We already allowed for arm64 on Linux, but the architecture is reported differently on macOS than on Linux (aarch64 vs arm64). (Because of course it would be reported differently!)

Motivation:

We don't officially support the Continuous Profiler on macOS BUT it actually mostly works, and so we have a toggle to enable it for development and testing purposes.

But up until now all macOS development had been on x86-64, and thus I had not noticed that our checks were too restrictive to allow development on arm64 macOS.

Additional Notes:

If there's enough customer interest, we may explore officially supporting profiling on macOS at some point.

How to test the change?:

Change includes test coverage. You can also test it if you have an arm64 macOS machine, by checking that

DD_PROFILING_MACOS_TESTING=true bundle exec rake clean compile

does not complain about the architecture not being supported.

(It will probably complain about a missing libdatadog, which is another thing you'll need to compile manually on macOS).

**What does this PR do?**:

This PR tweaks the ruby platform check prior to compiling the profiling
native extension to allow compilation on arm64 macOS.

We already allowed for arm64 on Linux, but the architecture is reported
differently on macOS than on Linux (aarch64 vs arm64). (Because of
course it would be reported differently!)

**Motivation**:

We don't officially support the Continuous Profiler on macOS BUT it
actually mostly works, and so we have a toggle to enable it for
development and testing purposes.

But up until now all macOS development had been on x86-64, and thus
I had not noticed that our checks were too restrictive to allow
development on arm64 macOS.

**Additional Notes**:

If there's enough customer interest, we may explore officially
supporting profiling on macOS at some point.

**How to test the change?**:

Change includes test coverage. You can also test it if you have an arm64
macOS machine, by checking that

```bash
DD_PROFILING_MACOS_TESTING=true bundle exec rake clean compile
```

does not complain about the architecture not being supported.

(It will probably complain about a missing libdatadog, which is
another thing you'll need to compile manually on macOS).
@ivoanjo ivoanjo requested a review from a team January 20, 2023 11:27
@github-actions github-actions bot added the profiling Involves Datadog profiling label Jan 20, 2023
@ivoanjo ivoanjo merged commit 23bf351 into master Jan 25, 2023
@ivoanjo ivoanjo deleted the ivoanjo/allow-macos-arm64-profiler-development branch January 25, 2023 15:41
@github-actions github-actions bot added this to the 1.9.0 milestone Jan 25, 2023
@TonyCTHsu TonyCTHsu mentioned this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
profiling Involves Datadog profiling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants