-
Notifications
You must be signed in to change notification settings - Fork 193
Problem with installing stackprof with native extensions #2044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Related: #1937 First, it's worth noting TruffleRuby already has a builtin CPU sampler via I'm not sure what's a good way forward for
I'm not sure how valuable it is to get @boris-spas FYI |
Is there a specific reason you want to use stackprof or just want to use some profiler (and anything missing in CPUSampler)? There is not a specific reason. I just wanted to experiment with some profiler and try to speed up some specs only for experimental development. I was thinking about the issue, and I need to say that you are right. I hadn't known about |
Thanks for the reply. One thought could be to print a message when |
I think that it is a good idea to show some information about profiling from TruffleRuby. Let's create some PR to stackprof. |
I have some issues with
by invoking I followed https://www.graalvm.org/docs/tools/profiler for Javascript without problems, but for Ruby, it was very problematic. |
Any issue, except that this specific program took too much memory? See https://github.com/oracle/truffleruby/blob/master/doc/user/debugging.md to find out what TruffleRuby is doing if it appears to hang. You can limit memory with e.g.
and to get more details:
Which sounds like we have hit a pathological case in Using Ctrl+\ while it runs seems to show we spend a lot of time in:
|
This is a Maybe we can treat BINARY Strings specially, e.g., by computing the CodeRange lazily for them (like for NativeRope). |
Thanks for your response. Your propositions sound like a good journey. GraalVM and its environments are pretty new for me, but I would like to dig deeper and learn.
sound like the easiest way of solving this problem, but yeah, exploring others can be interesting by itself. |
Of these alternatives, I think:
Is one of the most general solutions and probably a good idea. Computing the CodeRange eagerly for BINARY seems wasteful, unless it's later converted to a non-BINARY String (but we could just compute it then). But since the CodeRange is currently encoded in the Rope class (e.g.,
Seems hard for general cases. It seems there is no efficient way to compute the CodeRange for a substring of any String which is not CR_7BIT but also contains bytes >= 128 like here.
Could be valuable (also for other encodings) but probably high effort.
The easiest to get started with. cc @nirvdrum who wrote a lot of the Rope code, any opinion? @mc2dx |
I did not realize but the ChunkyPNG example is from https://github.com/oracle/truffleruby/blob/master/doc/user/tools.md |
@eregon Indeed, I have used the example from this document. I will try to prepare some sets of illustrations for profiling. |
I filed an issue to discuss on the stackprof repo: tmm1/stackprof#159 |
tmm1/stackprof#184 is merged upstream, so stackprof >= 0.2.21 installs fine on TruffleRuby. |
It works with the just-released stackprof 0.2.21:
|
Regarding the CRuby: one-shot: 0.713s peak: 1.557i/s So TruffleRuby is now faster in peak for that benchmark than CRuby. |
Hi there!
I am playing a lot with truffle-ruby last time and during the installation of the gem, I have encountered a problem.
I have in the Gemfile
I use the docker container with this Dockerfile. From stackprof#sampling about
rb_postponed_job_register_one
I think that it can be an interesting problem to solve. I would like to fix this issue. Is anybody interested in solving this problem with me?
The text was updated successfully, but these errors were encountered: