GoLand 2026.1 Help

Read the pprof profile

After you collect a profile, you can analyze it in the Go Performance Optimization tool window.

The profiler shows sampled data about your program execution. Each sample represents a captured call stack, so all values are estimates based on statistical sampling.

You can view the data using different representations, such as a table, a call graph, or a flame graph. Each view highlights a different aspect of performance and helps you find expensive functions and call paths.

Switch a sample type

  • Use the Show menu in the top-right corner of the tool window.

    The Show menu in the Go Performance Optimization tool window

The Go profiler provides several views to analyze the snapshot:

  • Top: a flat view that shows aggregated statistics for functions.

  • Graph: a call graph that shows relationships between functions.

  • Flame Graph: a visual representation of call stacks that helps you identify hot paths.

  • Tree: a hierarchical view of function calls and their contribution to execution time.

Top

The Top view shows aggregated profiling data for functions in a flat table. Each row represents a function and shows how much time or how many samples were recorded for it.

Top view in the Go profiler

The data in this view comes from profiling samples. Each sample represents a captured call stack during program execution.

The table includes the following metrics:

  • Flat – the time or number of samples recorded in the function itself. It does not include time or samples from functions that it calls.

  • Flat% – the percentage of total time or samples recorded in the function itself.

  • Sum% – the running total of Flat% values from top to bottom.

  • Cumulative – the total time or number of samples recorded in the function and all functions that it calls.

  • Cumulative% – the percentage of total time or samples that includes the function and its callees.

Use this view to find the most expensive functions. Start with functions that have the highest Flat or Cumulative values.

The values are based on statistical sampling. Each sample represents a captured call stack, so the numbers are estimates.

  • Click a function in the table to open its source code.

Sort results

  • Click a column header to sort functions by the selected metric, for example Flat or Cumulative.

Search in the top

  • Type a function name to highlight matching blocks.

Graph

The Graph view shows the call graph of your application. It displays functions as nodes and calls between them as edges.

Graph view in the Go profiler

Each node represents a function. Each edge represents a call from one function to another. The size and color of nodes reflect how much data is associated with each function, based on the selected sample type.

Each node label shows two values:

  • the value recorded in the function itself

  • the total value recorded in the function and all functions it calls

Use this view to understand how functions call each other and to identify expensive call paths.

Configure the graph display

  1. Configure the graph options:

    • Node count limits the number of displayed functions.

    • Node fraction hides functions that contribute less than the specified share of total samples.

    • Call tree controls how functions are displayed on the graph. When this option is disabled, nodes with the same function are merged into a single node. When it is enabled, each call is shown separately, which helps you distinguish between different call paths.

      For example, if the function foo() is called from different places in your program, the default graph shows a single node for foo(), but with Call tree enabled, each call to foo() appears as a separate node.

  2. Click Apply to update the graph.

  1. Click a node to focus on a function and inspect its connections.

  2. Double-click a node to open the function in the editor.

  3. Drag the graph to move the view. You can use the right mouse button, or hold Ctrl and drag with the left or right mouse button.

Flame Graph

The flame graph shows the call stack as a set of rectangles. Each rectangle represents a function call. The width of a rectangle shows how much time or how many samples the function uses. Wider rectangles indicate heavier functions.

Parent functions appear below their children. This layout helps you understand how work flows through your code.

Flame graph in Go profiler

Zoom the graph

  • Use the Zoom In (Zoom In icon) and Zoom Out (Zoom Out icon) icons to zoom in or out.

    Double-click a block to focus on a specific function.

    Click the Reset Zoom (Reset Zoom) icon to reset the zoom level.

Configure view settings

  1. Open the view settings menu in the toolbar.

  2. Enable or disable the following options:

    • Show Icicle Graph: switches between flame and icicle layout.

    • Sticky Text: keeps function names visible when zooming.

    • New Flame Graph View: uses the updated rendering mode.

    • Navigate with Single Click: opens functions with one click.

Flame graph view settings

Search in the graph

  1. Click the Show Search Toolbar (Show Search Toolbar icon) or press Ctrl+F.

  2. Type a function name to highlight matching blocks.

  3. Use navigation controls to move between matches.

Search in flame graph

Get function details

  • Hover over a block to see details.

    Tooltip in flame graph

Capture the graph

  1. Click the Capture Image icon (Capture Image) in the toolbar.

  2. Select one of the options:

    • Copy to Clipboard: copies the graph as an image.

    • Save: saves the graph as a PNG file.

Tree

The tree view shows function calls as a hierarchy. Each row represents a function. Child rows show functions that were called by the parent.

This view helps you understand how execution flows through the application and which call paths consume resources.

Tree view in Go profiler

Configure view settings

  1. Open the view settings menu in the toolbar.

  2. Enable or disable the following options:

    • Show Percentage of Total Time: shows the share relative to the whole profile.

    • Show Percentage of Parent: shows the share relative to the parent function.

    • Navigate with Single Click: opens code on a single click.

Tree view settings
  1. Expand or collapse nodes to explore call paths.

  2. Select a function to view its metrics.

Interpret metrics

  • Use the columns to analyze resource usage:

    • Flat – memory used or allocated directly in the function.

    • Flat% – share of total usage in the function.

    • Cumulative – memory used in the function and all its callees.

    • Cumulative% – share of total usage including child calls.

Search in the tree

  • Type a function name to highlight matching blocks.

Line profiler

When you open a snapshot, GoLand shows the Profiler tool window and adds runtime hints near the corresponding lines right in the editor.

Lines that took a significant amount of time to execute get grey labels, while the most resource consuming ones are marked with red labels with the fire icon.

Line profiler hints appear on opening a snapshot

Switching the viewing mode in the Profiler tool window also changes the mode for the labels in the editor. You can choose to view the total execution time of the method, its CPU time, or the amount of memory allocated as the result of executing this line.

If you want to drill-down and see what's inside a labeled method, clicking the hint will take you to the method declaration, where you can inspect the particular lines causing slowness.

Method implementation marked with runtime labels
05 May 2026