Integrated: 6988: Initial implementation of JFR binary format writer
Jaroslav Bachorik
jbachorik at openjdk.java.net
Fri Jan 15 17:54:07 UTC 2021
On Fri, 19 Jun 2020 10:22:41 GMT, Jaroslav Bachorik <jbachorik at openjdk.org> wrote:
> This is an initial implementation of JFR binary format writer in Java.
> The writer can write valid JFR files according to what is expected by the JMC JFR format reader.
> The writer is not complete in terms of performance and event settings support but in spite of that it is fairly usable.
>
> The typical flow is:
>
> 1. Obtain a new instance of Recording
> java
> Recording r = new Recording()
> 2. Register custom types for that recording
> java
> r.registerType(name, structure)
> 3. Get a new Chunk instance
> java
> Chunk c = r.newChunk()
> 4. Write event values
> java
> c.writeEvent(eventValue)
> 5. Finish the chunk and get the binary data
> java
> byte[] data = c.finish()
>
>
> For more complex usage check [ChunkComplexTest.java](https://github.com/openjdk/jmc/blob/4c2dd1407f462feae40b795d3a4c6d75544b4e82/core/org.openjdk.jmc.flightrecorder.writer/src/test/java/org/openjdk/jmc/flightrecorder/writer/ChunkComplexTest.java).
This pull request has now been integrated.
Changeset: 21239bc4
Author: Jaroslav Bachorik <jbachorik at openjdk.org>
Committer: Marcus Hirt <hirt at openjdk.org>
URL: https://git.openjdk.java.net/jmc/commit/21239bc4
Stats: 9738 lines in 91 files changed: 9703 ins; 0 del; 35 mod
6988: Initial implementation of JFR binary format writer
Reviewed-by: hirt
-------------
PR: https://git.openjdk.java.net/jmc/pull/84
More information about the jmc-dev
mailing list