Skip to content
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

Allow to use a sampling period of 1ms for the Polyglot Sampler #242

Closed
eregon opened this issue Oct 6, 2020 · 2 comments
Closed

Allow to use a sampling period of 1ms for the Polyglot Sampler #242

eregon opened this issue Oct 6, 2020 · 2 comments
Assignees

Comments

@eregon
Copy link
Member

eregon commented Oct 6, 2020

Currently, it seems that VisualVM enforces a period of 20ms when using the Polyglot Sampler.
This is quite imprecise, and often makes the profile less useful, especially if profiling for a short time or profiling a short script like bundle install on TruffleRuby for instance with a Gemfile like this:

source 'https://rubygems.org'
gem "path"

Could we make the period configurable, so it can be set to any value, down to 1ms?

BTW, --cpusampler defaults to a 1ms sample period, so this is well supported by CPUSampler:
https://github.com/oracle/graal/blob/9d21964f7afa35d4d4f3bece233a293b2682637e/tools/src/com.oracle.truffle.tools.profiler/src/com/oracle/truffle/tools/profiler/impl/CPUSamplerCLI.java#L94-L95

cc @norswap @chrisseaton

@jisedlac
Copy link
Member

Implemented in master.

@eregon
Copy link
Member Author

eregon commented Oct 29, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants