|
When the profiling agent is loaded for an attach session (either by the JProfiler GUI or by
jpenable, the profiling agent did not have the chance to instrument classes when they were
loaded. Instead, it has to reload them which puts a burden on the PermGem space of the heap.
Classes are not easily garbage collected and so the PermGem space has to support both old and new versions of all reloaded
classes. If the PermGen space is to small for a particular application, you can increase it with the VM parameter
-XX:MaxPermSize=128m.
When you choose "Dynamic instrumentation" as the method call recording type, it is important to choose
inclusive filters that focus on the classes of interest. In that way,
relatively few classes are instrumented. Alternatively, you can choose
Sampling in the profiling settings.
If JProfiler detects that the PermGen space would be overloaded with the current filter settings,
it will warn you in the session startup dialog.
You should then switch to sampling or define narrow inclusive filters. Clicking on the hyperlinks in the
warning message will quickly make these changes. When selecting inclusive filters, the total amount
of instrumented classes is monitored and you are notified if you exceed the approximate maximum number of
classes that can be instrumented.
|