This commit is contained in:
Kopatz
2025-12-02 16:49:16 +01:00
parent 8aef660e0e
commit 46f59836cb
4 changed files with 56 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
{ pkgs }:
{
environment.systemPackages = with pkgs; [
perf
hotspot
(writeShellScriptBin "start-recording" ''
PID=$(pgrep $1)
if [ -z "$PID" ]; then
echo "Process $1 not found."
exit 1
fi
sudo perf record -F 999 -p $PID -g
'')
];
}