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>
27 lines
932 B
C
27 lines
932 B
C
// tiny_sticky.h - Sticky TLS Active box
|
|
#pragma once
|
|
#include <stdint.h>
|
|
#include "hakmem_tiny.h"
|
|
#include "hakmem_tiny_superslab.h"
|
|
|
|
#ifndef TINY_STICKY_RING
|
|
#define TINY_STICKY_RING 3
|
|
#endif
|
|
|
|
// TLS sticky rings (exported for existing call sites)
|
|
extern __thread SuperSlab* g_tls_sticky_ss[TINY_NUM_CLASSES][TINY_STICKY_RING];
|
|
extern __thread uint8_t g_tls_sticky_idx[TINY_NUM_CLASSES][TINY_STICKY_RING];
|
|
extern __thread uint8_t g_tls_sticky_pos[TINY_NUM_CLASSES];
|
|
|
|
static inline void tiny_sticky_clear(int class_idx, int slot) {
|
|
g_tls_sticky_ss[class_idx][slot] = NULL;
|
|
g_tls_sticky_idx[class_idx][slot] = 0;
|
|
}
|
|
|
|
static inline void tiny_sticky_save(int class_idx, SuperSlab* ss, uint8_t slab_idx) {
|
|
uint8_t pos = g_tls_sticky_pos[class_idx];
|
|
g_tls_sticky_ss[class_idx][pos] = ss;
|
|
g_tls_sticky_idx[class_idx][pos] = slab_idx;
|
|
g_tls_sticky_pos[class_idx] = (uint8_t)((pos + 1u) % TINY_STICKY_RING);
|
|
}
|