3 ms·
One issue I've run across is spying on JRuby's native Java classes. Anyone have a solution?
by nxzero 10y ago
One issue I've run across is spying on JRuby's native Java classes. Anyone have a solution?
- ch4s3 10y agoI've only ever used VirtualVM, maybe Charles Nutter or Chris Seaton will appear and enlighten us both.
- chrisseaton 10y agoI'm not sure what you want to do. Is your problem that you do want to see the native Java classes, or you want to hide them and focus on the Ruby code? Or is the key thing you want a Java flame graph?
- ch4s3 10y agoJava classes and a flame graph would be nice sometimes. I really only know how to use pry and Virtual VM with JRuby.
- chrisseaton 10y agoIt looks like some people are using flame graphs for the JVM. http://techblog.netflix.com/2015/07/java-in-flames.html http://techblog.netflix.com/2015/07/java-in-flames.html I'm still puzzled that there seems to be no simple gprof-style graph profiler included with the JVM.
- aardvark179 10y agoI"m surprised as well. Last time I needed this I knocked something up that could use the internals of Mission Control or Visual VM to turn their profile formats into flame graphs, but I doubt it would keep working across versions, and it really needed more work to be something anybody else could use sensibly. It was however very easy to do (maybe half an hour's work) and produced very useful results. If you're using an invokeDynamic based language implementation however you will want to filter a lot of internal stack frames out of the graph, or you'll have trouble seeing past the LambdaForms to what's really going on.
- ch4s3 10y agoGood find, thanks Chris. Yeah, you'd think the JVM folks would work to add some tooling like that.
- ch4s3 10y agoInteresting, it looks like Sam Saffron's FlameGraph gem https://github.com/SamSaffron/flamegraph https://github.com/SamSaffron/flamegraph has worked with JRuby for about a year and I hadn't noticed.