what is this about
One may want to profile a program, maybe it is unexpectedly slow.
One may want to profile a program, maybe it is unexpectedly slow.
In your .csproj-file, add the following in the PropertyGroup:
<PropertyGroup> <PublishAot>true</PublishAot> <StripSymbols>false</StripSymbols> </PropertyGroup>
Then compile your program as follows:
dotnet publish -r linux-x64 -c Release(or -c Debug).
Then set the following environment variables:
export COMPlus_EnableDiagnostics=0 export DOTNET_GCHeapHardLimit=1C0000000 export COMPlus_PerfMapEnabled=1 export COMPlus_EnableEventLog=1
Last step: invoke callgrind with your application!
valgrind --fair-sched=yes --tool=callgrind bin/Release/net9.0/linux-x64/native/your_program_name
The result can be viewed with kcachegrind.
Click on the image for a bigger view:
For contact info, see this page.