dotnet / corefx-tools

Place to include various misc tools for .NET and .NET Core.
MIT License
58 stars 41 forks source link

[Linux] "perfcollect view" does not resolve NGEN symbols #64

Open sdmaclea opened 7 years ago

sdmaclea commented 7 years ago

@brianrob

While perfcollect collect <tracename> goes to the effort to run crossgen /CreatePerfMap <dll>, the perfcollect view <tracename> fails to use the perfmap to resolve the NGEN symbols.

It seems to me that the PerfMap is a format which is unsupported by perf for mmap-ped files.

The simplest solution might be creating DWARF debug info for the NGEN image.

There may actually be code in coreclr to already support writing this. GDB debug support in CoreCLR may actually be writing a ELF debug info to memory. Not certain, but that is what I remember from enabling GDB debug on Arm64.

Other options/hacks.

sdmaclea commented 7 years ago

There are at least three approaches used by people working on Java OS.

One of the approaches uses perf with --objdump=<script>. This may be enough to intercept the attempt to get symbols for NGEN dlls.