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>
55 lines
1.7 KiB
Python
55 lines
1.7 KiB
Python
#!/usr/bin/env python3
|
|
import sys, os, re
|
|
|
|
TEST_MAP = {
|
|
'Sequential LIFO': 'lifo',
|
|
'Sequential FIFO': 'fifo',
|
|
'Random Order Free': 'random',
|
|
'Interleaved': 'interleave',
|
|
'Long-lived vs Short-lived': 'longshort',
|
|
'Mixed Sizes': 'mixed',
|
|
}
|
|
|
|
def parse_file(path, allocator):
|
|
size = None
|
|
cur_test = None
|
|
results = []
|
|
with open(path,'r',errors='ignore') as f:
|
|
for line in f:
|
|
m = re.search(r'^SIZE CLASS:\s*(\d+) Bytes', line)
|
|
if m:
|
|
size = int(m.group(1))
|
|
cur_test = None
|
|
continue
|
|
# Detect tests
|
|
for key, short in TEST_MAP.items():
|
|
if key != 'Mixed Sizes' and key in line:
|
|
cur_test = short
|
|
break
|
|
if 'Mixed Sizes ---' in line or 'Test 5: Mixed Sizes' in line:
|
|
size = 'mixed'
|
|
cur_test = 'mixed'
|
|
m2 = re.search(r'^Throughput:\s*([0-9.]+) M ops/sec', line)
|
|
if m2:
|
|
thr = float(m2.group(1))
|
|
results.append((allocator, size, cur_test, thr))
|
|
return results
|
|
|
|
def main():
|
|
if len(sys.argv) != 2:
|
|
print('usage: parse_comprehensive_logs.py <dir>', file=sys.stderr)
|
|
sys.exit(1)
|
|
d = sys.argv[1]
|
|
out = []
|
|
for name, alloc in [('hakmem.log','hakmem'),('mimalloc.log','mimalloc'),('system.log','system')]:
|
|
p = os.path.join(d,name)
|
|
if os.path.exists(p):
|
|
out.extend(parse_file(p, alloc))
|
|
print('allocator,size,test,throughput_mops')
|
|
for rec in out:
|
|
print('{},{},{},{}'.format(rec[0], rec[1], rec[2], rec[3]))
|
|
|
|
if __name__ == '__main__':
|
|
main()
|
|
|