Profiling a running Java application in command line

前端 未结 7 1214
被撕碎了的回忆
被撕碎了的回忆 2020-12-23 11:37

I profile running Java applications often with VisualVM but it needs X to run on the machine.

I know I can connect through management port but that will be an offlin

7条回答
  •  春和景丽
    2020-12-23 12:03

    One way to profile an "already started" JVM is to aggregate multiple jstacks taken over time.

    You can for instance parse and display them as a FlameGraph (see details at the various answers for that link, I won't redundantly include them here).

提交回复
热议问题