← Back
Home › Systems › Compilers and language tooling

sampling-profiler

sampling profiler

perf, samply

SystemTechniques · 4Primitives · 18 sampling-profiler Debug info (DWARF)compilers · medium: DWARF stores a tree of typed entries (DIEs), a line-number bytecode, unwind tables and location expressions that map machine state back to source; pick it for ELF/Mach-O debug builds.›Stack unwindingcompilers · medium: Frame-pointer, DWARF CFI and compact unwinding of call stacksSymbolicationcompilers · medium: Map addresses to functions and lines via DWARF, PDB and source mapsDynamic instrumentation probeshardware-os · medium: Kprobes, uprobes and tracepoints: patch breakpoints at runtime and run handlersExecutable formats elf pecompilers · low: ELF, PE and Mach-O: sections, segments, symbol tables, relocations, dynamic loadingSPSC ring bufferdata-structures · low: Bounded wait-free queue for exactly one producer and one consumer thread, built from an array and two indices with acquire/release ordering.›String interningdata-structures · low: Store each distinct string once and refer to it by idSwiss tabledata-structures · low: Open-addressing hash table that filters 8-16 slots at once with 1-byte hash tags and SIMD, giving fast lookups at 87.5 % load.›Flame graphshardware-os · low: Aggregate sampled stacks into a prefix tree and render flame or icicle graphsHardware performance countershardware-os · low: PMU counters via perf_event: instructions, cycles, cache missesmmap and the page cachehardware-os · low: How read() and mmap reach file data through the kernel page cache, what readahead and madvise do, and why databases use their own buffer pool instead.›Varint (LEB128)compression · low: Variable-length integers in 7-bit groups with a continuation bit; small numbers take 1 byte, the wire format of Protobuf, WebAssembly and DWARF.›Calling conventions abicompilers · low: System V, Windows x64 and AAPCS64 ABIs: argument registers, stack frames, struct passing, FFISource mapscompilers · low: Source map v3: VLQ-encoded mappings from generated to original positionsInterval treedata-structures · low: Index of ranges that answers "which intervals overlap this point or range?" in O(log n + k); static sorted-array form is the compact, cache-friendly choice.›Breakpoints watchpointscompilers · low: Software breakpoints (int3 patching), hardware debug registers and single-steppingDisassemblycompilers · low: Instruction decoding for x86 (prefixes, ModRM, variable length) and ARM; linear sweep vs recursive traversalEbpfhardware-os · low: Verified in-kernel programs on hooks (kprobes, XDP, tc) with mapsFalse sharingconcurrency · low: Independent variables written by different cores on one cache line force the line to bounce between cores; pad or regroup hot data to fix it.›Memory orderingconcurrency · low: What Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.›+ 2 more primitives

Similar systems

Share the most building blocks with this one.