如何使用visualvm配置应用程序启动 [英] how to profile application startup with visualvm

查看:125
本文介绍了如何使用visualvm配置应用程序启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,你只能这样做使用VisualVM分析正在运行的应用程序

有没有人知道使用VisualVM分析启动和启动Java应用程序的方法?

Does anyone know of a way to profile the launch and startup of a java application using VisualVM?

我确信必须有办法,否则这将是一次重大的疏忽。

I'm convinced there must be a way, otherwise it would be a major oversight.

希望我只是误读了文件。

Hoping I've just misread the documentation.

谢谢,p。

推荐答案

你在设置吗?使用`-Xrunjdwp'命令行选项进行分析?如果是,该选项有一个暂停参数仅用于此目的:

Are you setting up the profiling using the `-Xrunjdwp" command-line option? If so, that option has a "suspend" parameter for just this purpose:


如果目标VM是在主类加载之前立即暂停;否则为false。

True if the target VM is to be suspended immediately before the main class is loaded; false otherwise.

来自我自己的配置的示例:

Example from my own config:

-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

我在YourKit分析器中使用它,但我认为原理是一样的。

I use this with the YourKit profiler, but I think the principle is the same.

这篇关于如何使用visualvm配置应用程序启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆