GoLand 2026.3 Help

Run profiling

Run profiling

You can start profiling in several ways. All options run your application with the Go profiler.

Run profiling

  • To run profiling, do one of the following:

    • Open the run configuration selector on the toolbar, click the More icon, and select Profile with GoLand Profiler.

      Run profiling from the toolbar
    • Open a file that contains a main function or a test, click the Run icon (The Run gutter icon) in the gutter, and select Profile with GoLand Profiler.

      Run profiling from the gutter
    • Open the Go Optimization tool window, select a configuration in the Profiling with pprof tab, and click Run with Profiler.

      Run profiling from the tool window
    • From the Run tool window using Rerun with Profiler.

      Run profiling from the Run tool window

Open the profiler from the terminal

When you run a profiling command in the Terminal tool window, GoLand can show a one-time tooltip next to the Go Optimization button. For example, the tooltip can appear after go tool pprof cpu.out or go test -cpuprofile cpu.out ..

Click Open to open Profiling with pprof in the Go Optimization tool window, or Skip to dismiss the tooltip. To run your application with the IDE profiler, select a configuration and click Run with Profiler.

Use the Go Optimization tool window

The Go Optimization tool window provides a central place to run profiling and manage profiling sessions.

Tool window overview

The Go Optimization tool window contains sections to start profiling and manage results.

The following screenshot shows the tool window when no profiling processes are running.

Run profiling from the tool window

When you start profiling, the tool window displays the Running processes pane.

Go Optimization tool window

The main components of the Go Optimization tool window are:

  • Configuration selector lets you choose a run configuration.

  • Run with Profiler starts profiling for the selected configuration.

  • Running processes shows active profiling sessions.

  • Recent profiles lists saved profiling results.

Capture a profile

Capture a profile

  1. Start your application with the Go profiler.

  2. In the Running processes pane of the Go Optimization tool window, click the process. The IDE opens its Run tool window.

  3. On the Go profiler toolbar in the Run tool window, click the action for the profile that you want to capture.

  4. For a CPU profile, click Start CPU Recording, run the workload that you want to analyze, and then click Stop CPU Recording. Each profiling session supports one CPU recording at a time.

  5. For a heap profile, click Heap with GC to run garbage collection before capture. Click Heap without GC to capture the profile without forcing garbage collection.

  6. To capture another profile, click its action. Click More Profiles to select Heap without GC, Block, Mutex, or Goroutine Leak.

Work with profiling sessions

Each process you start with the Go profiler has its own profiling session. The session ends when the process terminates. GoLand then removes the process from Running processes and disables its profile capture actions.

In the Run tool window, Session profiles lists profiles captured during that run, with the newest first. The Recent profiles section in the Go Optimization tool window keeps profiles from different runs, including after you restart the IDE.

View and open profiles

  1. Navigate to View | Tool Windows | Go Optimization.

  2. In the Go Optimization tool window, locate the Recent profiles section.

  3. Click a profile to open it in the profiler view.

Hide a profile from a session

  1. In the Run tool window, right-click a profile under Session profiles.

  2. Select Hide from Session. The profile remains on disk and in Recent profiles.

To remove a profile from the recent history, right-click it in Recent profiles and select Hide from Recent. This action also keeps the profile file on disk.

You can import pprof-compatible profiling data that was collected outside the IDE.

Import a profile

  1. In the Go Optimization tool window, click Import.

  2. In the file browser, select a pprof-compatible profile file.

  3. Open the imported profile from the Recent profiles section.

Export a profile

  1. In the Recent profiles section, right-click a profile.

  2. Select Reveal in Finder on macOS, Reveal in Explorer on Windows, or Reveal in File Manager on Linux.

  3. In the file manager, copy or move the pprof-compatible profile file to the required location.

    Export a profile
28 September 2026