Skip to content

Commit bb9d1f1

Browse files
committed
doc: write overview on slab tab in tcm ui
1 parent a365860 commit bb9d1f1

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed
-76.5 KB
Loading

doc/tooling/tcm/tcm_ui_overview.rst

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ This tab is useful for:
167167
- Analyzing cache saturation by object size
168168
- Debugging excessive memory use in real time
169169

170-
171170
This visualization is based on the output of:
172171

173172
.. code-block:: lua
@@ -189,16 +188,28 @@ These values are parsed and rendered as visual elements in the UI.
189188

190189
Each block represents a single slab (a fixed-size memory region). The color indicates how full the slab is:
191190

192-
- **Green** — slab is partially filled
191+
- **Green** — the slab is mostly empty
193192
- **Red** — slab is full (100% usage)
193+
- **Gradient colors between green and red** — indicate intermediate fill levels (e.g., 30%, 50%, 75%)
194194

195-
.. image:: _images/tcm_ui_slabs.png
196-
:width: 700px
195+
The color transitions smoothly, providing a quick visual way to understand which slabs are:
196+
197+
- Actively used
198+
- Partially utilized
199+
- Potentially underused or contributing to memory fragmentation
197200

201+
In the example screenshot:
198202

203+
- Slab #17 (168 KB) — 75% full (dark red)
204+
- Slab #18 (320 KB) — 53% full (brownish-red)
205+
- Slab #16 (40 KB) — only 1% used (bright green)
206+
- Slab #2 (56 B) — 60% used (intermediate gradient)
199207

200-
If multiple slabs are shown for the same object size, each slab’s fill level is calculated individually and visualized accordingly.
201-
Each row represents a cache class (object allocation group) for a specific `item_size`.
208+
Each slab block’s size in the visualization reflects the total memory allocated for its ``item_size`` class --
209+
the more memory allocated, the larger the visual representation.
210+
211+
.. image:: _images/tcm_ui_slabs.png
212+
:width: 700px
202213

203214
The overall fill percentage for a cache class is calculated using:
204215

0 commit comments

Comments
 (0)