GoLand 2024.2 Help

Mutex profiler

Mutex profiler shows you a fraction of stack traces of goroutines with contended mutexes.

Run Mutex profiling

  1. Open the _test.go file.

  2. Near the function or method that you want to profile, click the Run Application icon the Run Application icon in the gutter area and select Run <configuration_name> with 'Mutex Profiler'.

Run Mutex profiling

Interpreting the results

Flame Chart

The Flame Graph tab shows you function calls and the amount of time in which goroutines are not running (waiting). Each block represents a function in the stack. On the Y-axis, there is a stack depth going from bottom up. The X-axis shows the stack profile sorted in the increasing order according to the number of delays for each function (with Contentions selected) or according to the time that was spent in the waiting state (with Delay selected).

In the Flame Graph tab, you can hover over any block to view the details.

Memory profiling details

, where

  • 1

    : a number of delays at each region.

  • 100.00% of parent: percentage between different procedures that belong to a single parent call.

  • 50.00% of all: percentage of delay time for the procedure and all of its callees.

Call Tree

The Call Tree tab shows the call tree with a number of delays for each function (with Contentions selected) or with time that was spent in the waiting state (with Delay selected). It organizes the data in the decreasing order. To configure and filter the Call Tree view, use the Presentation Settings button the Presentation Settings button.

Presentation settings for the call tree
Method List

The Method List tab shows the list of methods that is sorted by a number of contentions. The Back Traces tab shows where the selected method has been called. The Merged Callees tab shows call traces that started from the selected method.

Last modified: 26 May 2024