samply icon indicating copy to clipboard operation
samply copied to clipboard

DTrace(FreeBSD) record support

Open ghost opened this issue 4 months ago • 0 comments

Currently samply does NOT support record in FreeBSD - will need to use dtrace for this.

#!/bin/bash
$@ &
TRACE_PROBE="profile-397 /pid == $! && arg1/ { @[ustack()] = count(); } tick-60s { exit(0); }"
sudo dtrace -Z -n "$TRACE_PROBE" -o dtrace-out.user_stacks 2>/dev/null || exit

This kind of "remote invokation" works usually... but libdtrace exists.

ghost avatar Aug 26 '25 04:08 ghost