Rebuild the README, add a demo build target and the hero GIF - #1
Merged
Conversation
The README documented only the flat table. It was missing the flame view, the stream timeline, the hover tooltip, GitHub linking, clipboard copy, source-line resolution, freeze, zoom and --freq, and it stated 99 Hz where the sampler defaults to 499. Rebuilt against the CLI/TUI README template: adds a questions section, an agent setup prompt, a sampling-profiler primer, a sample-output block with a column table, navigation tables for all three views, and a "what it can't see" section. demo/cafe.c and demo/patterns.c had gcc lines in their header comments but nothing built them, and their output wasn't gitignored, so a manual build dirtied the tree. Adds `make demo` / `make clean-demo` using the host compiler, a demo/README.md covering what each workload shows per view plus the GIF recording recipe, and gitignore rules that keep the sources tracked. The stale 99 Hz and "symbolizes the leaf frame" comments in sample.bpf.c are corrected to match the code. Verified on kernel 6.12 aarch64 with yeet 0.21.0: make, make demo and veristat all pass (on_sample, 80 insns); the sampler attaches cgroup-scoped at 499 Hz and resolves both user frames with source lines and kernel frames through kallsyms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Added
## Questions this tool answers(11), weighted to performance engineers with debugging secondary. Includes the two mandatory questions: "is this a replacement for Datadog Profiler / Pyroscope / Parca" (answered no) and "when should I use this instead ofperf top/py-spy".make demo/make clean-demo, buildingdemo/cafeanddemo/patternswith the host compiler at-O0 -g -fno-omit-frame-pointer.demo/README.md: what each workload shows per view, and the GIF recording recipe (terminal size, tour order, why each view needs a beat to fill).assets/hotspot.gif..cfiles and README tracked.Reading it without a TTY,Testing across kernels,What it can't see, FAQ, Contents block.Reshaped
How it workssplits into the BPF side and the JS side, covering cgroup scoping plus thetarget_pidfilter, theBigIntwire format for kernel PCs, and batchedsymbolizeMany.Fixed
profile.jsdefaults to 499.src/bpf/sample.bpf.c's header comment.make cleannow removes.dSYMbundles that clang leaves beside the demo binaries.The old README documented only the flat table. Undocumented before this: the flame view (
f), the stream timeline (t), the hover tooltip,--repo/--rev/--stripGitHub linking, OSC 52 clipboard copy (o), per-row source lines, freeze (␣), zoom, and--freq.Verification
Run on kernel 6.12.96 aarch64, yeet 0.21.0, not inferred:
makebin/probe.bpf.o+ 41.9kb bundlemake demomake cleandemo/sudo make veristaton_samplesuccess, 80 insns, 6 statessampling 499 Hz (cgroup), 2794 samples in ~6stoilresolved withcafe.c:28el0_svc,invoke_syscall,__arch_clear_user,vfs_readnamed and labeledkernel⏎arms the sampler,f/tswitch views,qexits cleanThe
debugSymsclaim was verified by experiment rather than assumed. Before installinglibc6-dbg, 27.3% of addprofile was?? (libc.so.6); after, the same rows resolve to__internal_syscall_cancel (cancellation.c:40)and__memcpy_generic (memcpy.S:166).Reviewer action items
git cloneit. I do not have admin (viewerPermission: WRITE), so this needs an org owner.ebpfbpflinuxprofilerprofilingperformanceflamegraphperf-eventsobservabilitycputracingyeet## Requirements.perf_eventBPF 4.9 andbpf_get_stack4.18 are upstream introduction versions, not stated anywhere in the repo and not tested below 6.1 (the CI matrix floor). Happy to drop the numbers and keep only the verified BTF requirement.bash,postgres, 2 to 21 samples), never thecafedemo workload. The flame frame with the tooltip is excellent; the flat-table moments look sparse. Worth a re-record against./demo/cafeif you want the table to sell itself, but not blocking.Notes
## Reading it without a TTYis a "you can't" section. There is noimport.meta.mainself-test on the probe module, no--jsonand no one-shot mode, so unlike every sibling in the corpus there is no headless path. The template permits this and argues it beats omitting the section, so it ships that way and names the seam a contributor would build on (attachProfile()already exposeshot/stacks/total/statusas signals).No
LICENSEfile was added, per instruction.## LicensestatesGPL-2.0.on the grounding of the BPFSEC("license")declaration.