Files
hakmem/core/tiny_debug_ring.h
Moe Charm (CI) 52386401b3 Debug Counters Implementation - Clean History
Major Features:
- Debug counter infrastructure for Refill Stage tracking
- Free Pipeline counters (ss_local, ss_remote, tls_sll)
- Diagnostic counters for early return analysis
- Unified larson.sh benchmark runner with profiles
- Phase 6-3 regression analysis documentation

Bug Fixes:
- Fix SuperSlab disabled by default (HAKMEM_TINY_USE_SUPERSLAB)
- Fix profile variable naming consistency
- Add .gitignore patterns for large files

Performance:
- Phase 6-3: 4.79 M ops/s (has OOM risk)
- With SuperSlab: 3.13 M ops/s (+19% improvement)

This is a clean repository without large log files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 12:31:14 +09:00

42 lines
1.2 KiB
C

#ifndef TINY_DEBUG_RING_H
#define TINY_DEBUG_RING_H
#include <stdint.h>
#include <stddef.h>
// Tiny Debug Ring Trace (Phase 8 tooling)
// Environment: HAKMEM_TINY_TRACE_RING=1 to enable
// Records recent alloc/free events and dumps them on SIGSEGV.
enum {
TINY_RING_EVENT_ALLOC_ENTER = 1,
TINY_RING_EVENT_ALLOC_SUCCESS,
TINY_RING_EVENT_ALLOC_NULL,
TINY_RING_EVENT_ALLOC_REFILL_START,
TINY_RING_EVENT_ALLOC_REFILL_NULL,
TINY_RING_EVENT_ALLOC_BIND,
TINY_RING_EVENT_FREE_ENTER,
TINY_RING_EVENT_FREE_FAST,
TINY_RING_EVENT_FREE_REMOTE,
TINY_RING_EVENT_FREE_LOCAL,
TINY_RING_EVENT_FREE_RETURN_MAG,
TINY_RING_EVENT_SUPERSLAB_ADOPT,
TINY_RING_EVENT_SUPERSLAB_ALLOC,
TINY_RING_EVENT_SUPERSLAB_PUBLISH,
TINY_RING_EVENT_SUPERSLAB_ADOPT_FAIL,
TINY_RING_EVENT_REMOTE_PUSH,
TINY_RING_EVENT_REMOTE_INVALID,
TINY_RING_EVENT_REMOTE_DRAIN,
TINY_RING_EVENT_OWNER_ACQUIRE,
TINY_RING_EVENT_OWNER_RELEASE,
TINY_RING_EVENT_FRONT_BYPASS,
TINY_RING_EVENT_MAILBOX_PUBLISH,
TINY_RING_EVENT_MAILBOX_FETCH,
TINY_RING_EVENT_MAILBOX_FETCH_NULL
};
void tiny_debug_ring_init(void);
void tiny_debug_ring_record(uint16_t event, uint16_t class_idx, void* ptr, uintptr_t aux);
#endif // TINY_DEBUG_RING_H