Document Phase 4c/4d master trace and stats control
Complete ENV cleanup Phase 4 documentation: - Phase 4c: HAKMEM_TRACE unified trace control - Phase 4d: HAKMEM_STATS unified stats control - Summary of all 6 new master control variables 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -362,6 +362,55 @@ Implementation: core/hakmem_debug_master.h
|
|||||||
- hak_debug_check("HAKMEM_FOO_DEBUG") - Check if module should enable debug
|
- hak_debug_check("HAKMEM_FOO_DEBUG") - Check if module should enable debug
|
||||||
- hak_is_quiet() - Quick check for quiet mode
|
- hak_is_quiet() - Quick check for quiet mode
|
||||||
|
|
||||||
Future Work (Phase 4c+):
|
Phase 4c: Master Trace Control (COMPLETED)
|
||||||
- HAKMEM_TRACE unified variable (consolidate 15 trace vars)
|
------------------------------------------
|
||||||
- HAKMEM_STATS unified variable (consolidate 15 dump vars)
|
New in 2025-11: Unified trace control.
|
||||||
|
|
||||||
|
- `HAKMEM_TRACE=all`
|
||||||
|
- Enable ALL trace modules at once
|
||||||
|
|
||||||
|
- `HAKMEM_TRACE=ptr,refill,free,mailbox`
|
||||||
|
- Enable specific trace modules (comma-separated)
|
||||||
|
|
||||||
|
- `HAKMEM_TRACE_LEVEL=N`
|
||||||
|
- Set trace verbosity (1=basic, 2=detailed, 3=verbose)
|
||||||
|
|
||||||
|
Available trace modules:
|
||||||
|
ptr, refill, superslab, ring, free, mailbox, registry
|
||||||
|
|
||||||
|
Implementation: core/hakmem_trace_master.h
|
||||||
|
|
||||||
|
Phase 4d: Master Stats Control (COMPLETED)
|
||||||
|
------------------------------------------
|
||||||
|
New in 2025-11: Unified stats/dump control.
|
||||||
|
|
||||||
|
- `HAKMEM_STATS=all`
|
||||||
|
- Enable ALL stats modules at once
|
||||||
|
|
||||||
|
- `HAKMEM_STATS=sfc,fast,pool`
|
||||||
|
- Enable specific stats modules (comma-separated)
|
||||||
|
|
||||||
|
- `HAKMEM_STATS_DUMP=1`
|
||||||
|
- Dump stats at process exit
|
||||||
|
|
||||||
|
Available stats modules:
|
||||||
|
sfc, fast, heap, refill, counters, ring, invariant,
|
||||||
|
pagefault, front, pool, slim, guard, nearempty
|
||||||
|
|
||||||
|
Implementation: core/hakmem_stats_master.h
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
ENV Cleanup Summary (2025-11)
|
||||||
|
=============================
|
||||||
|
- Phase 4a: Hot path getenv caching (hakmem_elo.c fixed)
|
||||||
|
- Phase 4b: HAKMEM_DEBUG_ALL/LEVEL master debug control
|
||||||
|
- Phase 4c: HAKMEM_TRACE unified trace control
|
||||||
|
- Phase 4d: HAKMEM_STATS unified stats control
|
||||||
|
|
||||||
|
Total new master control variables: 6
|
||||||
|
HAKMEM_DEBUG_ALL, HAKMEM_DEBUG_LEVEL
|
||||||
|
HAKMEM_TRACE, HAKMEM_TRACE_LEVEL
|
||||||
|
HAKMEM_STATS, HAKMEM_STATS_DUMP
|
||||||
|
|
||||||
|
All existing individual ENVs continue to work (backwards compatible)
|
||||||
|
|||||||
Reference in New Issue
Block a user