## Exceptional Methods |

| On this tab of the filter settings, you define methods whose exceptionally slow invocations will be shown separately in the call tree view. By default, JProfiler splits invocation events on the AWT thread in that way. If you click on on the Reset button, the default entries will be restored.

| Exceptional methods can be used to investigate outliers in the performance of selected methods. Often, certain methods are supposed to complete quickly, but occasionally an invocation will take much longer than the median time. In the call tree view, you cannot analyze those outliers, since all calls are cumulated. When you register a method for exceptional method recording, a few of the slowest invocations will be retained separately in the call tree. The other invocations will be merged into a single method node as usual. The number of separately retained invocations can be configured in the profiling settings, by default it is set to 5. When discriminating slow method invocations, a certain thread state can be used for the time measurement. By default, the wall clock time (all thread states) is used, but a different thread status can be configured in the profiling settings. Note that the thread status selection in the CPU views is not used in this case, but the separate setting in the profiling settings is used.

| Exceptional method runs are displayed differently in the call tree view. For the concerned method nodes, icons are changed and text is appended: [exceptional run] Such a node contains an exceptionally slow method run. By definition, it will have an invocation count of one. If many other method runs are slower later on, this node may vanish and be added to the "merged exceptional runs" node depending on the configured maximum number of separately recorded method runs. [merged exceptional runs] Method invocations which do not qualify as exceptionally slow are merged into this node. For any call stack, there can only be one such node per exceptional method. [current exceptional run] If an invocation was in progress while the call tree view was transmitted to the JProfiler GUI, it was not yet known whether the invocation was exceptionally slow or not. The "current exceptional run" shows the separately maintained tree for the current invocation. After the invocation completes, it will either be maintained as a separate "exceptional run" node or be merged into the "merged exceptional runs" node.

| To check the statistical properties of the distribution of call times of certain methods of interest, please start with the method statistics view. It can show you the outlier coefficient and a graph of call times versus frequency. This analysis allows you to assess whether an outlier is significant or not. From the method statistics view you can use the Add as exceptional method action in the context menu to add the method to the list of exceptional methods. The same context action is available in the call tree view.

| Apart from removing previously configured exceptional 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.