#profiler #signal #ckb-vm

ckb-vm-signal-profiler

Linux signal based profiler for ckb-vm, note this is profiling ckb-vm itself, not the programs running in ckb-vm

13 releases (breaking)

Uses new Rust 2024

new 0.200.1 Apr 24, 2025
0.200.0 Mar 6, 2025
0.121.0 Feb 5, 2025
0.119.0 Oct 25, 2024
0.112.1 Nov 22, 2023

#3 in #ckb-vm

Download history 81/week @ 2025-01-30 72/week @ 2025-02-06 1/week @ 2025-02-13 1/week @ 2025-02-20 12/week @ 2025-02-27 138/week @ 2025-03-06 1/week @ 2025-03-13

854 downloads per month

MIT license

22KB
417 lines

ckb-vm-signal-profiler

Signal based profiler for ckb-vm. Like gperftools, it uses a SIGPROF signal handler to suspend running CKB-VM programs so as to gather profiling data. One advantage of this solution, is that it requires no code injections into CKB-VM. However also due to this design choice, this profiler runs on Linux only for the moment.

See here for an example on using this library.

This library inherits a lot of the signal handler related code from pprof-rs library.

Notes

  • If anything weird happens when loading the generated profiling data, make sure you are using the golang based pprof at here, not the binary from gperftools with the same name.

Dependencies

~9–12MB
~227K SLoC