Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
377 views
in Technique[技术] by (71.8m points)

java - Why won't the VisualVM Profiler profile my application?

I've created a simple 1 file java application that iterates through a loop, calls some functions, allocates some memory, adds some numbers, etc. I run that application via eclipse's Run As->Java Application.

The running application shows up in Java VisualVM under Local.

I double click on that application and go to the Profiler tab.

The default settings are:

Start profiling from classes: my.main.package.**

Do not profile classes: java.*, javax.*, sun.*, sunw.*, com.sun.*

I click on CPU. The CPU and Memory buttons gray out. Nothing happens.

The Status says profiling inactive.

When my application terminates the Status says application terminated.

What am I doing wrong here? Are there some settings I need to tweak? Do I need to set a VM flag when I launch my application?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I had the same issue after java 1.7.0_45 update. I had to delete the following folder:

C:users'username'AppDataLocalTemphsperfdata_'username'

After doing so, everything works like a charm.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...