When I do performance profiling using perf, normally this works:perf record -g -F99 $BINARY_NAMEUpon completion, the command says:[ perf record: Captured and wrote 0.006 MB output.data (37 samples) ]And I can read the captured stack traces using perf script.However my program is doing asynchronous networking, and if the server(s) it's connecting are offline (my program is getting No route to host (os error 113), and handling them, and trying to connect again.), the perf command doesn't manage to collect samples:[ perf record: Captured and wrote 0.006 MB output.data ]When inspected with perf script, it doesn't output anything. When the servers are online, it works normally.My program is a native binary writen in Rust. Any ideas why might this happen?
Recording a process with perf using PID doesn't work
perf