|
If the method call recording type is set to
Dynamic instrumentation, all methods of
profiled classes are instrumented. This creates some overhead
which is significant for methods that have very short execution times. If such methods are called very frequently,
the measured time of those method will be far to high. Also, due to the instrumentation, the hot spot compiler
might be prevented from optimizing them. In extreme cases, such methods become the dominant hot spots
although this is not true for an uninstrumented run. An example is the method of an XML parser that reads the next
character. This method returns very quickly, but may be invoked millions of times in a short time span.
This problem is not present when the
method call recording type is set to
Sampling. However, sampling does not provide invocations counts, shows only longer method calls
and several view such as the method statistics view and the
call tracer do not work when sampling is used.
To alleviate the problem with dynamic instrumentation, JProfiler has a mechanism called
auto-tuning. From time to time, the profiling agent checks for such methods and transmits them
to the JProfiler GUI. In the status bar, an entry such as
3 overhead hot spots
will be shown. You can click on that status bar entry to review the detected overhead hot spots and
choose to accept them into the list of ignored methods. These ignored methods will then not be instrumented.
When a session is terminated, the same dialog is shown.
|