skills: start the daemon in the samply and drive.sh harnesses #413
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!413
Loading…
Reference in a new issue
No description provided.
Delete branch "skills/samply-systemd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #394.
On a systemd desktop the client's autospawn hands the daemon to
systemd-run --user, sosamply-profile.sh(samply launch mode on the client) never saw the daemon, anddrive.shnever got the daemon's log lines. Both harnesses now startfelis-daemon serve --socket $SOCKthemselves: under samply for the profile, with stderr in$LOGfor drive.sh. They wait for the bind (and confirm the daemon is still alive) before pointing the client at that socket, withSHELLset on the client, since the session shell comes from the client's environment.Other changes in the same scripts:
samply-profile.shreports a profile only if akitten __benchmark__run completed in the window, samply exited 0, and the output passesgzip -t. Otherwise it exits 1 and shows the client or samply log.NOTIFY_SOCKETunset. An inherited one makesserveexit right after its bind when the readiness send fails.Verification (Linux, niri)
drive.shend to end with a Kitty graphics escape: the log holds both the daemon's (listening,dispatch_apc_bodies) and the client's (image header) lines; only the run's own daemon is killed; the user's daemon is untouched. Also passes with a staleNOTIFY_SOCKETexported, and fails cleanly (exit 1, no leftover process) with a daemon binary that never binds.samply-profile.sh: real samply cannot run on this host (perf_event_paranoid= 2, no sudo), so the launch plumbing was run with a stand-insamplyonPATHthat runs the command after--and writes the output when the child exits. Results:kitten __benchmark__;daemon stop --forceends it and the profile is written;TMPDIRcontaining a space works;perf recordin place of samply (user-modecycles:uwith LBR stacks) produced the daemon profiles posted on #399.Still to check on a host with
perf_event_paranoid <= 1: one real samply run.Review
pi sol review rounds: 1 BLOCKED (3 findings), 2 BLOCKED (3), 3 BLOCKED (2), 4 BLOCKED (1), 5 PASS. Every finding was verified and fixed; none were rejected.
natsukium referenced this pull request2026-09-25 04:11:40 +09:00