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>
34 lines
848 B
C
34 lines
848 B
C
#ifndef HAKMEM_ACE_STATS_H
|
||
#define HAKMEM_ACE_STATS_H
|
||
|
||
#include <stdint.h>
|
||
#include <stdatomic.h>
|
||
|
||
// Sampling mask: if zero → off; else sample when (ctr & mask)==0
|
||
void hkm_ace_stats_init(void);
|
||
void hkm_ace_set_sample_mask(uint32_t mask);
|
||
|
||
// MidPool (2–32KiB)
|
||
void hkm_ace_stat_mid_attempt(int hit);
|
||
|
||
// LargePool (64KiB–1MiB)
|
||
void hkm_ace_stat_large_attempt(int hit);
|
||
|
||
// Fallback (malloc path for L1)
|
||
void hkm_ace_stat_l1_fallback(void);
|
||
// Free counters (L1 pools)
|
||
void hkm_ace_stat_mid_free(void);
|
||
void hkm_ace_stat_large_free(void);
|
||
|
||
// Snapshot for learner
|
||
typedef struct {
|
||
uint64_t mid_hit, mid_miss;
|
||
uint64_t large_hit, large_miss;
|
||
uint64_t l1_fallback;
|
||
uint64_t mid_free, large_free;
|
||
} hkm_ace_stats_snapshot_t;
|
||
|
||
void hkm_ace_stats_snapshot(hkm_ace_stats_snapshot_t* out, int reset);
|
||
|
||
#endif // HAKMEM_ACE_STATS_H
|