How to dump a RecordingStream?
Gunnar Morling
gunnar at hibernate.org
Mon Nov 23 09:00:40 UTC 2020
Hi,
Is it possible to dump the underlying Recording of a JEP 349
RecordingStream into a file at a given point in time?
I can't seem to find any way for doing that; so what I'm currently doing is
to start a Recording, and then get a stream via
EventStream.openRepository() which will expose the recording's events; That
way, I have a reference to the Recording instance and can call dump(). Is
this the right way to do it? Perhaps it would make sense to have a method
dump() on RecordingStream(), too, so to simplify this?
My use case is that I'm examining the JFR events based on the stream. If it
doesn't satisfy certain requirements, I'd like to dump the stream for
offline analysis e.g. via JMC [1].
Thanks a lot,
--Gunnar
[1] https://twitter.com/gunnarmorling/status/1330623384418455559
More information about the hotspot-jfr-dev
mailing list