-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support pns style flamegraph #886
Labels
Comments
Have you tried See #795 for the details. |
This mode appears to be exactly what I need, but in some cases, it fails to capture the Java method stack. enviroment$ java -version
openjdk version "17-internal" 2021-09-14
OpenJDK Runtime Environment (slowdebug build 17-internal+0-adhoc.kk.openjdk)
OpenJDK 64-Bit Server VM (slowdebug build 17-internal+0-adhoc.kk.openjdk, mixed mode)
$ uname -a
Linux staging-liqisheng-02.dev.kwaidc.com 3.10.0-1160.11.1.el7.x86_64 #1 SMP Fri Dec 18 16:34:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux test code
import java.lang.Throwable;
public class InitLockTest {
public static class Test1 {
static {
// 初始化块
System.out.println(Thread.currentThread().getName() + " initializing Test1 class...");
Test2.test();
System.out.println(Thread.currentThread().getName() + " Test1 class initialized.");
}
public static void test() {
System.out.println(Thread.currentThread().getName() + " in Test1 test method.");
}
}
public static class Test2 {
static {
// 初始化块
System.out.println(Thread.currentThread().getName() + " initializing Test2 class...");
Test1.test();
System.out.println(Thread.currentThread().getName() + " Test2 class initialized.");
}
public static void test() {
System.out.println(Thread.currentThread().getName() + " in Test2 test method.");
}
}
public static void main(String[] args) {
new Thread(() -> Test1.test()).start();
new Thread(() -> Test2.test()).start();
}
} cstack=vmcommand java -agentpath:/tools/async-profiler-3.0-linux-x64/lib/libasyncProfiler.so=start,event=cpu,file=profile.html,timeout=60,cstack=vm InitLockTest result: call_stub is not parsed correctly,so there’s no java method cstack=fpjava -agentpath:/tools/async-profiler-3.0-linux-x64/lib/libasyncProfiler.so=start,event=cpu,file=profile.html,timeout=60,cstack=fp InitLockTest |
apangin
added a commit
that referenced
this issue
Feb 6, 2024
I added support for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The pns function is a debug function in jvm debug version,it gives more details:
help info:
for example:
jstack and async get call trace seems just ignored the native call between java calls:
The detail information is import for investigate problem like class deadlock init.
Can async profiler support pns style flamegraph?
The text was updated successfully, but these errors were encountered: