-
Couldn't load subscription status.
- Fork 135
Description
Hello!
Currently stackprof fails to install on TruffleRuby, due to the extconf.rb checking for rb_postponed_job_register_one() and rb_profile_frames() and those APIs are not implemented on TruffleRuby.
It's also a good question whether implementing rb_profile_frames() on TruffleRuby would even make sense, because it would likely be pretty inefficient.
I see multiple alternatives, which I detailed in truffleruby/truffleruby#2044 (comment)
I think in the shorter term it would be nice if the gem would install on TruffleRuby, but when used at runtime raise an exception with some message linking to truffleruby/truffleruby#2044 and mentioning the built-in --cpusampler as an alternative.
Longer term, I think it would be worth a try to implement rb_profile_frames() in TruffleRuby using CPUSampler#takeSample and see if that has a reasonable overhead or if it's too high to be practical and other APIs would be needed.
Do the stackprof maintainers have any opinion about that?