feature: Tracer O(1) ring buffer refactor #12

Merged
admin merged 1 commits from feature/tracer-optimizations into develop 2026-03-01 22:29:55 +00:00
Owner
  • Replaced O(n) shift loop + StringCopy/kalloc/kfree with O(1) ring
    buffer storing PChar pointers directly (zero allocation).
  • Eliminated mod operator (causes int64 promotion + broken RTL helpers
    on i386 bare-metal); uses pure uint32 branch arithmetic.
  • Removed dead code: PTracerEntry/TTracerEntry linked list types,
    head/tail PTracerEntry vars, c_lock boolean
  • Dropped lmemorymanager and serial from uses clause
  • pop_trace remains as no-op stub for ABI compat
  • get_trace_N uses underflow-safe index: if head >= idx then
    head - idx else MAX_TRACE - (idx - head)
  • Added print_traces debug helper
- Replaced O(n) shift loop + StringCopy/kalloc/kfree with O(1) ring buffer storing PChar pointers directly (zero allocation). - Eliminated mod operator (causes int64 promotion + broken RTL helpers on i386 bare-metal); uses pure uint32 branch arithmetic. - Removed dead code: PTracerEntry/TTracerEntry linked list types, head/tail PTracerEntry vars, c_lock boolean - Dropped lmemorymanager and serial from uses clause - pop_trace remains as no-op stub for ABI compat - get_trace_N uses underflow-safe index: if head >= idx then head - idx else MAX_TRACE - (idx - head) - Added print_traces debug helper
admin added 1 commit 2026-03-01 22:23:30 +00:00
feature: Tracer O(1) ring buffer refactor
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
f53afc1d2d
- Replaced O(n) shift loop + StringCopy/kalloc/kfree with O(1) ring
  buffer storing PChar pointers directly (zero allocation).
- Eliminated mod operator (causes int64 promotion + broken RTL helpers
  on i386 bare-metal); uses pure uint32 branch arithmetic.
- Removed dead code: PTracerEntry/TTracerEntry linked list types,
  head/tail PTracerEntry vars, c_lock boolean
- Dropped lmemorymanager and serial from uses clause
- pop_trace remains as no-op stub for ABI compat
- get_trace_N uses underflow-safe index: if head >= idx then
  head - idx else MAX_TRACE - (idx - head)
- Added print_traces debug helper
admin merged commit 983d9a428d into develop 2026-03-01 22:29:55 +00:00
Sign in to join this conversation.