Is it possible to use async-profiler for alloc and itimer at the same time

不打扰是莪最后的温柔 提交于 2021-02-05 09:31:09

问题


While using async-profiler I run the profiles for cpu and alloc separately but was hoping it would be possible to use them as part of the same duration? Given the output format types supported, this only seems to make sense if JFR is used.


回答1:


Yes, this feature is implemented in v2.0 branch of async-profiler. The branch is currently under development, use with care. Planned for the next major release.

To specify multiple events in the command line, use

profiler.sh -e cpu,alloc -f out.jfr ...

The same as an agent option:

-agentpath:/path/to/libasyncProfiler.sh=start,event=cpu,event=alloc,file=out.jfr,...

As you've correctly guessed, this works only with JFR output.

For the feedback, comment the corresponding GitHub issue.



来源:https://stackoverflow.com/questions/63652702/is-it-possible-to-use-async-profiler-for-alloc-and-itimer-at-the-same-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!