开发者

Java VisualVM: How to initialize settings BEFORE a process starts?

VisualVM is practically the stand开发者_StackOverflow社区alone Netbeans Profiler (which is a great tool, by the way).

But what I am missing, is the ability to initialize monitoring settings for a process before it starts.

Usually, in VistualVM, one can open a process and start changing settings only when the process is already running. This is a problem when one should want to profile a shorter-term process.

Sadly, this solution doesn't work: A Java program doesn't starts "fast enough", and gets suspended before it would be recognized by VisualVM as such.

Is it possible to do somehow?

NOTE 1: My current workaround: I added a cmd-line switch to my project: "-W" to wait for an [enter] key press.

NOTE 2: Strange, the Netbeans Profiler still gives much more realistic profiling results. But it has a bug currently, which forces me to recompile the main project the amount of times of linked projects ;) That'll be 12... And I failed to reproduce the bug.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜