KEMBAR78
async-profiler native mode does not attach to an embedded JVM · Issue #1174 · async-profiler/async-profiler · GitHub
Skip to content

async-profiler native mode does not attach to an embedded JVM #1174

@arielb1

Description

@arielb1

Describe the bug

When native API (asprof_init/asprof_execute) async-profiler runs on code that embeds a JVM and calls from Rust/C/C++ into Java, async-profiler will not attach to the embedded JVM. Therefore, it won't have visibility into Java, and code that includes Java stack frames will appear to be .unknown.

Since this breaks unwinding, you won't even see the Rust/C/C++ that called into Java, just .unknown.

Expected vs. actual behavior

expected: Java stack traces that are useful
actual: Java stack traces that are .unknown

Reproduction Steps

I don't have a small reproducer, but you can have Rust/C/C++ code that embeds a JVM.

Async-profiler version

latest

Environment details

Linux. Both x86-64 and aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions