Analyzer py-gco-ref

Name

py-gco-ref - Python GC Object Reference Flame Graph

This analyzer traces object reference chains in Python’s garbage collector to understand memory retention patterns. It captures the reference relationships between objects, identifying what keeps objects alive in memory. The analyzer generates flame graphs that visualize object reference hierarchies by memory size, helping diagnose memory leaks and understand complex object retention scenarios in Python applications.

Resource Category

Memory.

Application Type & Technical Stack

  • Python

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 py-gco-ref -p PID

# trace a shell command directly
orxray analyzer run py-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.