Repository navigation
v0.2.0
Added
/spark profiler start --allocon Windows, producing an uploaded spark
ALLOCATIONprofile weighted by sampled UCRT allocation bytes./spark profiler start --allocon Linux x86-64 using atomic BDS ELF import-slot
hooks for glibc allocation entry points./spark profiler start --alloc-live-onlyfor retained-allocation call trees and
leak-candidate analysis by allocation stack and age.- Byte-based allocation stack sampling with spark's default 524287-byte interval,
a randomized systematic sampling phase, a preallocated hook event pool,
deferred module/symbol resolution, per-second windows, and
--only-ticks-oversupport. - CMake FetchContent integration for funchook v1.1.3, avoiding an unavailable
Conan Center package.
Changed
- Reject ambiguous export-only UCRT symbol names during Windows symbolization and
fall back tomodule+0xRVAinstead of displaying unrelated nearest exports. - Export allocation sample count, dropped sample count, estimated sampled byte
weight, observed request bytes, interval, backend, and coverage through spark
extra_platform_metadata. - Report every candidate allocation entry point as active, aliased, missing, or
unhookable in profiler status and exported platform metadata. - Follow sampled allocations through realloc and free entry points across threads,
reporting live/freed estimates and sampled allocation lifetimes on both native
backends. - Preserve the process's effective Linux allocator implementation, including
LD_PRELOADinterposition, while redirecting BDS import slots. - Harden native hook lifecycle handling: prepare and retain trampolines separately
from entry-hook installation, retain disabled entry hooks between sessions,
stabilize and verify thread suspension, retry thread restoration, and require
complete entry-hook removal plus hook/trampoline quiescence before plugin unload.
An unrecoverable cleanup failure terminates the process instead of pinning old
plugin code or permitting an unsafe reload. - Treat the allocation aggregator as a fallible service: failures disable capture,
block partial-profile export, remain visible through profiler status, and allow
a clean subsequent session after stop/cancel. - Report failed allocation sessions explicitly, discard their incomplete data on
stop/cancel/timeout, and confirm when the backend is ready to start again. - Write valid gzip-compressed local profiles atomically and automatically save a
local copy when upload fails, so completed captures are not lost to the network. - Replace the finite repeated threshold table with constant-time systematic byte
sampling using a fresh uniformly random phase per session. Allocation weights
use successful requested sizes and every sampling point is attributed to the
allocation that contains it. - Expand native coverage to recalloc, aligned allocation families, internal UCRT
base exports, and directHeapAlloc/HeapReAlloc, while avoiding duplicate hooks
for alias exports. - Encapsulate Windows allocation backend state in the
AllocationSamplerinstance
instead of file-level mutable globals. - Removed the temporary
/spark alloc start|info|stop|reset|testvalidation
commands and their allocation/free counter implementation. - Stop sampling before collecting plugin/world export metadata so the profiler's
own metadata allocations are not included in allocation profiles.
Limitations
- Native allocation profiling, sampled lifetimes, and retained/live analysis cover
the selected server thread on Windows and Linux x86-64. - Custom thread selection, direct virtual-memory calls, and custom allocator
activity below its backing Windows heap allocation are not yet supported.
Full Changelog: v0.1.1...v0.2.0