Skip to content

Stop considering COR_PRF_DISABLE_OPTIMIZATIONS an immutable Event Mask #113921

@simonferquel

Description

@simonferquel

Today, COR_PRF_DISABLE_OPTIMIZATIONS is defined as an immutable flag, which means you can switch it on or off after profiler initialization.
It seems quite arbitrary as the Debugger API allows to set very similar debug bits on modules dynamically and the way the JIT knows if optimizations are disabled are in this macro: https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/vars.hpp#L559 which queries pretty much in the same way the debugger and profiler flags.

For Unity Core CLR editor, we have a need to be able to switch that flag on or off dynamically to improve developer experience when debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Diagnostics-coreclrenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions