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
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 installon TruffleRuby for instance with aGemfilelike this:Could we make the period configurable, so it can be set to any value, down to 1ms?
BTW,
--cpusamplerdefaults 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