Split Methods


  On this tab of the filter settings, you define methods that will be split in the call tree view according to the result of a script invocation.
  Often, you can expect different performance characteristics for different parameter values of a method. By splitting a method with a script, you can look at the call tree separately for all different values of a parameter or any other calculated string.

Splitting a method is most easily done by selecting the method in the call tree view and invoking Split method with a Script from the context or "View" menu.

In the script editor, you can then enter a script whose return value of type java.lang.String will be used for splitting the call tree. Splitting nodes in the call tree show that string value and have a  special icon.

You can temporarily disable a splitting script by deselecting the check box in front of the script configuration.

Call tree splitting scripts that create a different splitting string for each invocation can create a lot of overhead. To avoid excessive memory usage, method splitting is capped.

  Apart from removing previously configured split methods, you can also add exceptional 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.
  • 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.
  • 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.