简体   繁体   中英

Java flight recorder programmatically parsing

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM