Emit Systemtap probes from your crystal application for debugging and performance tracing.
Add it to Projectfile
deps do
github "aktowns/probe-stap"
end
require "probe-stap"
probe_stap_emit(myprobe, "Hello", "World")
then you can monitor using a SystemTap script like the following:
probe process.mark("myprobe") {
printf("%s %s (%p,%p) \n", user_string($arg1), user_string($arg2), $arg1, $arg2);
}
$ stap -c "myapp" script_file.stp
Hello World (0x40c34c,0x40c36c)
Learning crystal as I go, advice/hints welcome!
- Fork it ( https://github.com/aktowns/probe-stap/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- aktowns Ashley Towns - creator, maintainer