Skip to content

TruffleRuby support #159

@eregon

Description

@eregon

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions