R2R symbols for code contained in a single file exe cannot be resolved by native profilers (e.g. Visual Studio, WPA, PerfView). This is because the single file exe only points to singlefilehost.pdb. This allows for the native runtime symbols to be resolved, but no managed code R2R symbols.
Reproduction Steps
Build a single file exe with R2R enabled. (Disabling TieredCompilation will make the repro easier.)
Take a PerfView profile of the single file exe running.
Load the profile in PerfView and open the single file exe process's CPU stacks.
Attempt to resolve symbols for any R2R code. If TieredCompilation=false, then this is all managed code.
Expected behavior
R2R symbols are resolvable.
Actual behavior
R2R symbols cannot be resolved.
Regression?
No.
Known Workarounds
Do not compile the single file exe with R2R enabled.
If the binary is built with R2R, you can disable it at runtime for profiling by setting DOTNET_ReadyToRun=0.
Tagging subscribers to this area: @agocke, @vitek-karas, @vsadov
See info in area-owners.md if you want to be subscribed.
Issue Details
### Description
R2R symbols for code contained in a single file exe cannot be resolved by native profilers (e.g. Visual Studio, WPA, PerfView). This is because the single file exe only points to singlefilehost.pdb. This allows for the native runtime symbols to be resolved, but no managed code R2R symbols.
### Reproduction Steps
1. Build a single file exe with R2R enabled. (Disabling TieredCompilation will make the repro easier.)
2. Take a PerfView profile of the single file exe running.
3. Load the profile in PerfView and open the single file exe process's CPU stacks.
4. Attempt to resolve symbols for any R2R code. If TieredCompilation=false, then this is all managed code.
### Expected behavior
R2R symbols are resolvable.
### Actual behavior
R2R symbols cannot be resolved.
### Regression?
No.
### Known Workarounds
1. Do not compile the single file exe with R2R enabled.
2. If the binary is built with R2R, you can disable it at runtime for profiling by setting `DOTNET_ReadyToRun=0`.
### Configuration
_No response_
### Other information
_No response_
Description
R2R symbols for code contained in a single file exe cannot be resolved by native profilers (e.g. Visual Studio, WPA, PerfView). This is because the single file exe only points to singlefilehost.pdb. This allows for the native runtime symbols to be resolved, but no managed code R2R symbols.
Reproduction Steps
Expected behavior
R2R symbols are resolvable.
Actual behavior
R2R symbols cannot be resolved.
Regression?
No.
Known Workarounds
DOTNET_ReadyToRun=0
.Configuration
No response
Other information
No response