Figure 11.1: Java VisualVM profiler
VisualVM lists all the Java processes that can be profiled by it on the local machine under the Local
node. You can see VisualVM itself listed along with Eclipse.
Figure 11.2: The CourseManagement application available for profiling
- Double-click on the process (or right-click and select
Open
). Then, go to theProfile
tab and click on theCPU
button:
Figure 11.3: VisualVM Profiler tab
You should see the status set as profiling running
.
- After starting CPU profiling, if you get an error such as
Redefinition failed with error 62
, try running the application with the-XVerify:none
parameter. In Eclipse, select theRun
|Run
Configurations
menu and then select theCourseManagement
application under theJava Application
group. Go to theArguments
tab and add-Xverify:none
toVM arguments
. Run the...