Infrastructure and build updates

- Update build configuration and flags
- Add missing header files and dependencies
- Update TLS list implementation with proper scoping
- Fix various compilation warnings and issues
- Update debug ring and tiny allocation infrastructure
- Update benchmark results documentation

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
Moe Charm (CI)
2025-11-11 21:49:05 +09:00
parent 79c74e72da
commit 862e8ea7db
34 changed files with 541 additions and 214 deletions

View File

@ -141,6 +141,18 @@ static inline void tiny_debug_validate_node_base(int class_idx, void* node, cons
// Fast cache refill and take operation
static inline void* tiny_fast_refill_and_take(int class_idx, TinyTLSList* tls) {
// Phase 1: C0C3 prefer headerless array stack (FastCache) for lowest latency
if (__builtin_expect(g_fastcache_enable && class_idx <= 3, 1)) {
void* fc = fastcache_pop(class_idx);
if (fc) {
extern unsigned long long g_front_fc_hit[];
g_front_fc_hit[class_idx]++;
return fc;
} else {
extern unsigned long long g_front_fc_miss[];
g_front_fc_miss[class_idx]++;
}
}
void* direct = tiny_fast_pop(class_idx);
if (direct) return direct;
uint16_t cap = g_fast_cap[class_idx];
@ -173,11 +185,16 @@ static inline void* tiny_fast_refill_and_take(int class_idx, TinyTLSList* tls) {
while (node && remaining > 0u) {
void* next = *(void**)((uint8_t*)node + next_off_tls);
if (tiny_fast_push(class_idx, node)) {
node = next;
remaining--;
int pushed = 0;
if (__builtin_expect(g_fastcache_enable && class_idx <= 3, 1)) {
// Headerless array stack for hottest tiny classes
pushed = fastcache_push(class_idx, node);
} else {
// Push failed, return remaining to TLS
pushed = tiny_fast_push(class_idx, node);
}
if (pushed) { node = next; remaining--; }
else {
// Push failed, return remaining to TLS (preserve order)
tls_list_bulk_put(tls, node, batch_tail, remaining, class_idx);
return ret;
}