Call Tracer

## Call Tracer |

| The call tracer shows a multi-threaded chronological sequence of method calls. To record call traces, click Record call traces in the tool bar or select View->Record call traces from JProfiler's main menu. If you have previously recorded call traces, the old recorded data will be lost. Bookmarks will be added when recording is started or stopped manually. Please note that recording call traces can generate massive amounts of data in a very short time. To avoid problems with excessive memory consumption, a cap is set on the maximum number of collected call traces. That cap is configurable in the view settings. The amount of collected traces heavily depends on your filter settings. Also see the help topic on method call filters for background information. By default, calls into filtered classes are recorded, similarly to the default behavior of the hot spot view. Calls into filtered classes can be excluded in the view settings. Call tracing only works when the method call recording type is set to "dynamic instrumentation". Sampling does not keep track of single method calls, so it is technically not possible to collect call traces with sampling.

| To facilitate navigation, all method calls are grouped in a tree on three levels: Threads Every time the executing thread changes in the call sequence, a new thread node is created. Packages Every time the Java package changes in the call sequence, a new package node is created. Classes Every time the class changes in the call sequence, a new class node is created. At the lowest level there are method entry and method exit nodes. If call traces into other methods have been recorded from the current method or if another thread interrupts the current method, the entry and exit nodes for the that method will not be adjacent. Initially, all nodes are collapsed, so you see a sequence of thread nodes after the traces have been recorded. You can navigate on the method level only by using the skip to next method trace (`Alt-Down`) and skip to previous method trace (`Alt-Up`) actions.

| Each node displays the following information: Name For thread nodes, this is the thread name, for package nodes this is the package name and for class nodes this is the fully qualified class name. By default, method nodes show the method name and the method signature. In the view settings, you can decide to drop the signature or add the fully qualified class name. The latter can be useful when using the quick search feature. Trace count Thread, package and class nodes display the number of method call traces that are contained in them. Trace time The trace time on the right side is one of Relative to first trace The displayed time is the difference between the current call trace and the first displayed call trace. This is the default setting. Relative to previous node The displayed time is the difference between the current call trace and the previous node. If the previous node is the parent node, that difference will be zero. Relative to previous node of the same type The displayed time is the difference between the current call trace and the previous node of the same type. For example, if the current node is a class node, the previous node of the same type is the previous class node in the tree. The time display type can be configured in the view settings.

| A huge number of traces can be collected in a very short time. To eliminate traces that are of no interest, the call tracer allows you to quickly trim the displayed data. For example, traces in certain threads might not be interesting or traces in certain packages or classes might not be relevant. Also, recursive method invocations can occupy a lot of space and you might want to eliminate those single methods only. You can hide nodes by selecting them and pressing the delete key. All other instances of the selected nodes and all associated child nodes will be hidden as well. You can select multiple nodes and delete them together. Alternatively, you can select the hide selected nodes action from the toolbar or the context menu. To show hidden nodes again, you can click on the show hidden button or select View->Show Hidden from the main menu to show the show hidden elements dialog.