async-profiler

The Redefine Team Lv5

async-profiler

async-profiler 是一个分析java 的分析工具

项目地址在async-profiler

在ArchLinux 中可以直接通过以下命令安装

1
yay async-profiler 

默认安装目录在/opt 下

在使用之前,需要

1
echo 1 > /proc/sys/kernel/perf_event_paranoid

不然会导致不能正确的对程序进行profiler

通过jps -mlv 命令,获取需要分析程序的pid

example:

1
2
jps -mvl
2022 StaticExample

通过profiler.sh 分析程序,并生成svg

example:

1
/opt/async-profiler/profiler.sh -d 30 -f flamegraph.svg 2022

然后通过浏览器就可以连蓝svg 文件,可以看到主要在运行的类/方法

  • 标题: async-profiler
  • 作者: The Redefine Team
  • 创建于 : 2019-07-24 16:38:16
  • 更新于 : 2023-05-23 18:52:03
  • 链接: https://redefine.ohevan.com/2019/07/24/async-profiler/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论
目录
async-profiler