Java Reference
In-Depth Information
The graph on the left shows (in red) the total amount of heap allocated in our
application's Java Virtual Machine, additionally, it shows the total amount of heap
used by our application (in purple).
The graph in the middle is useful for detecting "memory leaks". (Java has garbage
collection, therefore, in theory, memory leaks are impossible, however if we keep
references to objects that are no longer needed, they are never garbage collected,
therefore in practice a memory leak is possible.) The purple line in the middle graph
indicates the amount of time the JVM spends doing garbage collection. The red line
indicates "Surviving Generations". A generation is a set of objects that were created
within two garbage collection intervals. A "Surviving Generation" is a generation
that survived one or more garbage collections. We can force our application to
garbage collect by clicking on the icon in the Profiling control panel. If the graph
indicates a high number of surviving generations between garbage collections, we
might have a memory leak in our application.
The graph on the right of the VM Telemetry Overview window indicates the
number of active threads and the number of loaded classes in our application.
Summary
The NetBeans profiler is a very valuable tool in identifying performance problems
in our applications. It provides several useful tools to aid us in identifying poorly
performing code, as well as allowing us to easily monitor memory usage and object
allocation in our applications. More information about the NetBeans profiler can be
found at http://profiler.netbeans.org/ .
 
Search WWH ::




Custom Search