Skip to content

Commit 7a58811

Browse files
committed
Add binary reader for sampling profiler
Implements binary file parsing with stack reconstruction. On Unix, uses mmap with MADV_SEQUENTIAL for efficient sequential access. Falls back to buffered I/O on Windows. The reader reconstructs full stacks from delta-encoded records by maintaining per-thread state. Each sample's stack is rebuilt by applying the encoded operation (repeat/suffix/pop-push) to the previous stack for that thread. Replay feeds reconstructed samples to any collector, enabling conversion between formats without re-profiling.
1 parent 83603c7 commit 7a58811

File tree

1 file changed

+1075
-0
lines changed

1 file changed

+1075
-0
lines changed

0 commit comments

Comments
 (0)