davidmarkclements / 0x

🔥 single-command flamegraph profiling 🔥
MIT License
3.21k stars 103 forks source link

--kernel-tracing does not properly wait for `perf record` to produce data #242

Closed dlants closed 2 years ago

dlants commented 2 years ago
0x --kernel-tracing --kernel-tracing-debug app.js
^C[ perf record: Woken up 14 times to write data ]
🔥  Process exited, generating flamegraphWARNING: The /tmp/perf-6e7996.data file's data size field is 0 which is unexpected.
Was the 'perf record' command properly terminated?
[ perf record: Captured and wrote 3.335 MB /tmp/perf-6e7996.data (6797 samples) ]
🔥  Stats collected in folder file:///home/ubuntu/pillow/73020.0x

As you can see, 0x complains about missing perf data before perf reports writing the data. This seems like a bug very similar to https://github.com/davidmarkclements/0x/pull/45

dlants commented 2 years ago

For the record, I'm running:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

$ perf --version
perf version 5.4.101

$ 0x --version
0x 4.11.0

(on ec2 machines)

RafaelGSS commented 2 years ago

@mcollina could you close it?