Ignored Methods


  On this tab of the filter settings, you see methods an classes that should be completely ignored by JProfiler. The two main use cases for this feature are call site mechanisms of dynamic languages such as Groovy, and methods that have been identified as overhead hot spots and that you have accepted into the list of ignored methods.

By default, JProfiler ignores the call site mechanism of Groovy. If you click on on the  Reset button, the default entries will be restored.

  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.

  All ignored methods will be missing in the call tree. Their execution time will be added to the self time of the calling method. If you find later on, that some ignored methods are indispensable in the profiling views, you can activate this tab in the filter settings and delete those methods.

In case that you do not want to see messages about auto-tuning, you can disable it in the profiling settings. Also, several parameters can be adjusted to broaden or narrow the scope of the methods that are considered as overhead hot spots.

You can also add ignored methods directly on this tab of the filter settings. The following ways for selecting methods are available:

  • Search in configured classpath
    A class chooser will be shown that shows all classes in the classpath configured in the application settings. Finally you have to select a method from the selected class.
  • Search in other JAR or class files
    First, you can select a JAR or class file. If the selection is a JRE file, you then have to select a class in a class chooser. After the selection you will be asked whether to expand the classpath with the current selection. For remote sessions, the classpath is often not configured, so this is a shortcut to make your selection permanent. Finally, you can select a method from the selected class.

    Alternatively, you can choose all methods from the selected class by selecting the "All methods" radio button at the top of the dialog.

  • Search in profiled classes
    If the session is being profiled, a class chooser is displayed that shows all classes in the profiled JVM. There may be classes in the classpath that have not been loaded. Those classes will not be shown in the class chooser. Finally, you can to select a method from the selected class.

    Alternatively, you can choose all methods from the selected class by selecting the "All methods" radio button at the top of the dialog.

  • Enter manually (advanced)
    This option displays a dialog that allows you to enter class name, method name and method signature in JNI format. The JNI format of the method signature is explained in the javadoc of com.jprofiler.api.agent.probe.InterceptionMethod.

    The context menu for the list of methods offers the option to edit existing entries.

    To select all methods from a class, enter * for the method name and the empty string for the signature.