You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[.NET 8] Some Symbol Entries in perf-%pid.map Are Truncated #102938
There is a regression in .NET 8 where symbols written to perf-%pid.map can be truncated. This means that profiling tools can display the wrong symbols after a profile has been captured on Linux.
Reproduction Steps
Build the following application against .NET 8 on Linux:
using System;
public static class Program
{
public static void Main(string[] args)
{
while(true)
{
Console.WriteLine();
}
}
}
Run export COMPlus_PerfMapEnabled=1 to enable generation of perf-%pid.map files.
Clear all perf-%pid.map files from /tmp.
Run the application built in step 1 and then kill it via CTRL+C.
Open /tmp/perf-%pid.map for the application. There is likely only one because we cleared out all the previous files.
Search for ConsolePal::Writ(.
Expected behavior
An entry for System.ConsolePal::Write should exist. Here's an example correct entry:
This was subsequently fixed in .NET 9 via #98687. I have confirmed that applying this PR to .NET 8 fixes the problem. Requesting that we backport this change to .NET 8.
Activity
brianrob commentedon May 31, 2024
@jakobbotsch, @janvorli what do you think about porting #98687 to .NET 8?
janvorli commentedon May 31, 2024
I think it is trivial enough to be safe to backport.
brianrob commentedon Jun 3, 2024
Thanks @janvorli. Created backport PR #103003.
brianrob commentedon Jun 3, 2024
Fixed via #103003.