Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add ETW instrumentation to allow profilers to map JITed code to function names #137022

Copy link
Copy link
@canova

Description

@canova
Issue body actions

Feature or enhancement

Proposal:

For Linux and macOS, currently cpython has perf maps/jitdump support (macOS support is added in #136461)

In here, Jeff mentioned that Windows support is possible through ETW JSCRIPT9::MethodLoad events instead of jitdump: #136461 (comment)

This will allow samply and also Windows Performance Analyzer to read and inject these JITed function names.

Firefox and Chrome both emit these events for jitted JS code:
https://bugzilla.mozilla.org/show_bug.cgi?id=1765402
https://bugs.chromium.org/p/v8/issues/detail?id=11043

For more specifically, code for this is here:
https://searchfox.org/mozilla-central/rev/387160feb07b75ae76bfc12df035a10f58d25168/js/src/jit/PerfSpewer.cpp#643
https://chromium.googlesource.com/v8/v8/+/88926769783fecb3bd3b08a7a0cb702b037d9f85/src/diagnostics/system-jit-win.cc

Some more links that were mentioned in other bugs:
https://github.com/Zhentar/UnityEtwSymbols/blob/e3614341a9553b2c916c9ebb12ace4a0eb46291b/etwSymbols.c
https://github.com/chakra-core/ChakraCore/blob/1eae003b7a981b4b691928daef27b5254a49f5eb/lib/Runtime/Language/AsmJsEncoder.cpp#L246

Note: ETW stands for Event Tracing for Windows

cc @pablogsal

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

#136461.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.