RFR: 6988: Initial implementation of JFR binary format writer [v6]
Jaroslav Bachorik
jbachorik at openjdk.java.net
Wed Jan 13 17:47:25 UTC 2021
> 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).
Jaroslav Bachorik has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
Update copyright year
-------------
Changes:
- all: https://git.openjdk.java.net/jmc/pull/84/files
- new: https://git.openjdk.java.net/jmc/pull/84/files/bf689bad..931cac11
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jmc&pr=84&range=05
- incr: https://webrevs.openjdk.java.net/?repo=jmc&pr=84&range=04-05
Stats: 125 lines in 63 files changed: 0 ins; 0 del; 125 mod
Patch: https://git.openjdk.java.net/jmc/pull/84.diff
Fetch: git fetch https://git.openjdk.java.net/jmc pull/84/head:pull/84
PR: https://git.openjdk.java.net/jmc/pull/84
More information about the jmc-dev
mailing list