DevilKing's blog

冷灯看剑,剑上几分功名?炉香无需计苍生,纵一穿烟逝,万丈云埋,孤阳还照古陵

0%

Java performance master

原文链接

1
Thread.getAllStatckTraces()

有关jvm的safepoint部分

主要是socket部分,关于buffer的读取?

使用AsyncGetCallTrace

1
2
3
AsyncGetCallTrace(ASGCT_CallTrace *trace,
jint depth,
void* ucontext)

Perf Event

1
2
3
4
5
6
7
8
9
10
11
$ perf record –F 1009 java ...
$ perf report

4.70% java [kernel.kallsyms] [k] clear_page_c
2.10% java libpthread-2.17.so [.] pthread_cond_wait
1.97% java libjvm.so [.] Unsafe_Park
1.40% java libjvm.so [.] Parker::park
1.31% java [kernel.kallsyms] [k] try_to_wake_up
1.31% java perf-18762.map [.] 0x00007f8510e9e757
1.21% java perf-18762.map [.] 0x00007f8510e9e89e
1.17% java perf-18762.map [.] 0x00007f8510e9cc17

Perf + FlameGraph