Analyzer go-gco-ref

Name

go-gco-ref - Go-Land GC Object Reference Flame Graph

This analyzer traces object references and retention paths in Go applications to identify what keeps objects alive in memory. It generates flame graphs showing reference chains from GC roots to allocated objects, helping diagnose memory leaks caused by unintended object retention. The analyzer is essential for understanding complex object lifecycle issues and optimizing memory management in Go applications.

Resource Category

Memory.

Application Type & Technical Stack

  • Go

Command Line Syntax

The analyzer can be invoked directly on the command-line via the orxray utility from the openresty-xray-cli software package.

Alternatively, the analyzer can also be invoked manually or automatically on the web console UI of OpenResty XRay (like on the Advanced web page).

# PID is the target process PID.
orxray analyzer run go-gco-ref -p PID

# trace a shell command directly
orxray analyzer run go-gco-ref -c SHELL_CMD

Tracing Multiple Processes

Not supported.

Output Formats

  • Flame Graphs

Author

The OpenResty Inc. Team.

Copyright (C) by OpenResty Inc. All rights reserved.