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 了解一下
功能二:使用watch命令在生产环境上查看方法出入参Arthas使用watch命令(生产上查看方法出入参)
功能三:trace命令可以跟踪统计方法耗时1蚂蚁面试 ↩︎



