Skip to content

Commit 10e1627

Browse files
committed
8296733: JFR: File Read event for RandomAccessFile::write(byte[]) is incorrect
Reviewed-by: phh Backport-of: ced88a2fd9a35e0e027661ef1f3c5ea3a5fff9e0
1 parent 615bf95 commit 10e1627

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/RandomAccessFileInstrumentor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public void write(byte b[]) throws IOException {
156156
write(b);
157157
bytesWritten = b.length;
158158
} finally {
159-
long duration = EventHandler.timestamp();
159+
long duration = EventHandler.timestamp() - start;
160160
if (handler.shouldCommit(duration)) {
161161
handler.write(start, duration, path, bytesWritten);
162162
}

0 commit comments

Comments
 (0)