rubinius/rubinius — pull request #2880 by YorickPeterse (2014-01-09 23:31:40+00:00)
Title: Expose more JIT metrics.

This exposes the cache resets counter and the global serial to Ruby, making it easier to access this information without having to go through the agent.

As mentioned in the commit both the location and names are up for debate. I'm not really sure if we should dump them in `Rubinius::VM` as it will quickly become a dumper for random metrics. Sadly `Rubinius::JIT` is already taken and re-using `Rubinius::VM::JITInfo` doesn't make much sense since instances of this class are created every time `Rubinius::VM.jit_info` is called (it's a waste to create a class instance just to get a number that's already there).

The reason for exposing these values is that at @olery we'd like to measure JIT activity in an environment where these metrics will be requested rapidly, probably much faster than the agent can handle with. The rationale behind measuring JIT activity is to see if some code is wreaking havoc on caches during runtime or not. If this were the case this would be an indicator to start measuring more in depth using various other tools.