Skip to content

[Linux] Add initial perf jitdump support #13462

@sdmaclea

Description

@sdmaclea

Linux uses the perf tools to profile application. The linux 4.10 kernel added support for a perf jitdump format.

It has allows better JIT support for perf. Specifically allowing adding:

  • native code so perf can show disassembly of JIT functions.
  • adding debug info to support source line annotation.
  • adding unwind info to better support stack unwind.

I believe this will also allow us to properly support ready to run images.

The app must

  • create the jitdump file. Specification
  • Inform perf inject of its presence by calling mmap with the filename.
  • Add JIT_CODE_LOAD records
  • Optionally add JIT_DEBUG_INFO records
  • Optionally add JIT_CODE_UNWINDING_INFO records

It is used like this

perf record <app>
perf inject --jit
perf report

/cc @dotnet/dotnet-diag

Metadata

Metadata

Assignees

Labels

area-Diagnostics-coreclrenhancementProduct code improvement that does NOT require public API changes/additionsos-linuxLinux OS (any supported distro)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions