Java flight recorder programmatically parsing

China☆狼群 提交于 2019-12-20 03:07:07

问题


I'm trying to Parse JFR dump using JAVA. I followed this blog, http://hirt.se/blog/?p=446 . But these methods are deprecated now. Is there any supported parsers for JFR to JAVA? if not can you point me is it possible to retrieve data from JFR dump?


回答1:


As Klara mentioned, there is no officially supported parser. Hopefully the JFR parser will be supported officially in JDK 9. For now, you can use the APIs mentioned in Hirt's blog. Don't worry about those being deprecated. :)

I have successfully used JFR parser in my jfr-flame-graph project. Please note that my project uses Maven and the JFR parsers are not available in Maven Central (or any other repository). Therefore the "Step 1" in the README is important and it'll copy JFR parser jars to a local repository and you can use those jars as dependencies in your pom.xml

I hope this helps.




回答2:


There is currently no supported parser. There are however many people both inside and outside of Oracle who are using the parsers mentioned in that blog post quite successfully.

There will possibly be a supported parser in the future, there will certainly be changes to the parser, I'm just no sure if it will be "supported" or not. But the code you are writing now should work just fine with JDK 7 and 8 flight recordings, and will not will with JDK 9 recordings.



来源:https://stackoverflow.com/questions/37272867/java-flight-recorder-programmatically-parsing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!