功能一:火焰图
Arthas 使用 async-profiler 生成 CPU/堆内存火焰图进行性能分析。
使用 async-profiler 可以做下面几个方面的分析:
CPU cycles
Hardware and Software performance counters like cache misses, branch misses, page faults, context switches etc.
Allocations in Java Heap
Contented lock attempts, including both Java object monitors and ReentrantLocks
我:可以先定位CPU/内存异常的Java进程(如用top命令),再用火焰图分析。例如:[2021-06-04][PRE] policy api异常,机器人问答模式和测试窗无法回复:
,超好用的自带火焰图的 Java 性能分析工具 Async-profiler 了解一下