Analyzer lj-gco-ref
Name
lj-gco-ref - GC Object Reference Flame Graph
This analyzer profiles garbage collection (GC) object references in LuaJIT-based applications such as OpenResty and Kong. It traverses the entire object graph starting from GC roots and captures reference chains to all reachable objects. The analyzer generates flame graphs that visualize memory usage by reference paths, showing which objects are holding references to other objects and how much memory each reference chain consumes. This helps identify memory retention issues, detect reference leaks, and understand object lifetime management in Lua applications.
Resource Category
Memory.
Application Type & Technical Stack
- OpenResty
- Kong
- APISIX
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 lj-gco-ref -p PID
# trace a shell command directly
orxray analyzer run lj-gco-ref -c SHELL_CMD
Tracing Multiple Processes
Not supported.
Output Formats
- Flame Graphs
Author
The OpenResty Inc. Team.
Copyright
Copyright (C) by OpenResty Inc. All rights reserved.