Disable ICorProfiler on non-desktop and WASM platforms#126550
Disable ICorProfiler on non-desktop and WASM platforms#126550AaronRobinsonMSFT merged 6 commits intodotnet:mainfrom
Conversation
Refactor FEATURE_CORPROFILER in clrfeatures.cmake to disable the ICorProfiler feature on Android, Mac Catalyst, iOS, and WASM targets. Previously the profiler was unconditionally enabled and then only explicitly disabled for WASM. This consolidates the logic into a single guard that excludes all unsupported platforms and makes the flag overridable from the command line. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Refactors the CoreCLR CMake feature-flag logic for FEATURE_CORPROFILER so ICorProfiler support is disabled by default on unsupported targets (mobile + WASM) while allowing command-line overrides.
Changes:
- Wrap
FEATURE_CORPROFILERdefaulting inif(NOT DEFINED FEATURE_CORPROFILER)to allow CLI override. - Enable
FEATURE_CORPROFILERonly for non-WASM, non-mobile targets (Android, iOS, Mac Catalyst). - Remove the prior WASM-specific override that forcibly set
FEATURE_CORPROFILER 0.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@jkotas @noahfalk I'm updating the logic here based on #126493 (comment). |
|
@dotnet/dotnet-diag Do we have any scenarios for ICorProfiler on iOS and Android? Is anything going to break if we drop it? |
|
@thaystg Please let me know if any of your prototypes need this to a degree that we should defer limiting it for the related platform. |
|
We need this enabled at least until preview 3. |
Other than its use as the in-proc debugger loading mechanism I'm not aware of any other scenarios that require it. @thaystg - are you aware of anything else that requires it?
What if we turned it off for WASM now, and turn it off for Android/iOS in a future preview once we've resolved the in-proc debugging loading? |
I'm not aware of any 3rd parties specifically asking/planning to use it and it hasn't been there historically on Mono. I'd be happy to have it off for now and wait to see some clear evidence that profiler vendors want it on these platforms. |
Done. |
|
/ba-g Unrelated failures |
Note
This PR description was generated with the help of GitHub Copilot.
Refactor
FEATURE_CORPROFILERinclrfeatures.cmaketo consolidate the ICorProfiler feature flag logic:if(NOT DEFINED FEATURE_CORPROFILER), allowing it to be set from the command line.FEATURE_CORPROFILER 0separately.