Skip to content

Commit

Permalink
[Backport] 8226511: Implement JFR Event Streaming
Browse files Browse the repository at this point in the history
Summary:

Test Plan: jdk/jfr

Reviewed-by: yuleil

Issue: dragonwell-project/dragonwell8#112
  • Loading branch information
D-D-H committed Jul 31, 2020
1 parent 66bf03b commit a279f1d
Show file tree
Hide file tree
Showing 131 changed files with 10,365 additions and 996 deletions.
30 changes: 30 additions & 0 deletions src/share/classes/jdk/jfr/Recording.java
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,36 @@ public void setMaxSize(long maxSize) {
internal.setMaxSize(maxSize);
}

/**
* Determines how often events are made available for streaming.
*
* @param interval the interval at which events are made available for streaming.
*
* @throws IllegalArgumentException if {@code interval} is negative
*
* @throws IllegalStateException if the recording is in the {@code CLOSED} state
*
* @since 14
*/
public void setFlushInterval(Duration interval) {
Objects.nonNull(interval);
if (interval.isNegative()) {
throw new IllegalArgumentException("Stream interval can't be negative");
}
internal.setFlushInterval(interval);
}

/**
* Returns how often events are made available for streaming purposes.
*
* @return the flush interval, or {@code null} if no interval has been set
*
* @since 14
*/
public Duration getFlushInterval() {
return internal.getFlushInterval();
}

/**
* Determines how far back data is kept in the disk repository.
* <p>
Expand Down
30 changes: 30 additions & 0 deletions src/share/classes/jdk/jfr/conf/default.jfc
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,36 @@
<setting name="enabled">true</setting>
</event>

<event name="jdk.Flush">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.FlushStorage">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.FlushStacktrace">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.FlushStringPool">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.FlushMetadata">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.FlushTypeSet">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.DataLoss">
<setting name="enabled">true</setting>
</event>
Expand Down
30 changes: 30 additions & 0 deletions src/share/classes/jdk/jfr/conf/profile.jfc
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,36 @@
<setting name="enabled">true</setting>
</event>

<event name="jdk.Flush">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.FlushStorage">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.FlushStacktrace">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.FlushStringPool">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.FlushMetadata">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.FlushTypeSet">
<setting name="enabled">true</setting>
<setting name="threshold">0 ns</setting>
</event>

<event name="jdk.DataLoss">
<setting name="enabled">true</setting>
</event>
Expand Down
174 changes: 0 additions & 174 deletions src/share/classes/jdk/jfr/consumer/ChunkParser.java

This file was deleted.

72 changes: 0 additions & 72 deletions src/share/classes/jdk/jfr/consumer/EventParser.java

This file was deleted.

Loading

0 comments on commit a279f1d

Please sign in to comment.