Skip to content

Conversation

adamsitnik
Copy link
Member

@adamsitnik adamsitnik commented Sep 28, 2022

While working on dotnet/BenchmarkDotNet#2117 I've realized that:

  • by default dotnet symbol writes the symbol files next to the input files, so we can reduce the process by one step
  • it supports recursive search, which allows us to provide a version-independent command

Sample output (I am also asking for dotnet exe symbols as I am pedantic and want to have all symbols solved)

// start /tmp/BenchmarkDotNet/symbols/dotnet-symbol --recurse-subdirectories --symbols "/home/robox/adsitnik/performance/tools/dotnet/arm64/dotnet" "/home/robox/adsitnik/performance/tools/dotnet/arm64/lib*.so" in
Downloading from https://msdl.microsoft.com/download/symbols/
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/dotnet.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/host/fxr/6.0.9/libhostfxr.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libmscordbi.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libSystem.Net.Security.Native.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libSystem.Native.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libmscordaccore.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libSystem.Globalization.Native.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libhostpolicy.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libSystem.Security.Cryptography.Native.OpenSsl.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libcoreclrtraceptprovider.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libcoreclr.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libSystem.IO.Compression.Native.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libclrjit.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/shared/Microsoft.NETCore.App/6.0.9/libdbgshim.so.dbg
Writing: /home/robox/adsitnik/performance/tools/dotnet/arm64/packs/Microsoft.NETCore.App.Host.linux-arm64/6.0.9/runtimes/linux-arm64/native/libnethost.so.dbg

@adamsitnik adamsitnik added documentation Documentation bug or enhancement, does not impact product or test code area-Tracing-coreclr labels Sep 28, 2022
@adamsitnik adamsitnik added this to the 8.0.0 milestone Sep 28, 2022
@adamsitnik adamsitnik requested a review from brianrob September 28, 2022 19:15
@ghost ghost assigned adamsitnik Sep 28, 2022
```
sudo cp mySymbols/* /usr/share/dotnet/shared/Microsoft.NETCore.App/2.1.0
sudo dotnet symbol --recurse-subdirectories --symbols '/usr/share/dotnet/lib*.so'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend changing this to *.so instead of lib*.so.

Comment on lines 178 to 179
To download symbols for all native libraries and store them next to them:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this is a good improvement. I also recommend that you make it clear that this will download symbols for the .NET runtime/framework as well as any other installed frameworks (e.g. ASP.NET), and give folks an idea of how to limit to just one type of framework (e.g. Microsoft.NETCore.App).

@tommcdon
Copy link
Member

tommcdon commented Jan 9, 2023

Hi @adamsitnik! Thanks for the contribution! Please review @brianrob's comment and let us know if you are interested in moving forward with this PR.

@adamsitnik
Copy link
Member Author

@brianrob @tommcdon I've turned the feedback into GH suggestions and applied them. PTAL

Copy link
Member

@tommcdon tommcdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@adamsitnik adamsitnik merged commit b577e6b into dotnet:main Jan 9, 2023
@brianrob
Copy link
Member

brianrob commented Jan 9, 2023

Thanks @adamsitnik!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tracing-coreclr documentation Documentation bug or enhancement, does not impact product or test code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants