corefx-tools icon indicating copy to clipboard operation
corefx-tools copied to clipboard

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

Open sdmaclea opened this issue 7 years ago • 1 comments

@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.

  • Use the assembler to generate elf with debug info ?
  • Use binutils objcopy to generate elf from symbolsrec format ?
  • ZapDisable=1

sdmaclea avatar May 18 '17 18:05 sdmaclea

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.

sdmaclea avatar May 19 '17 15:05 sdmaclea