Skip to content

Commit ced88a2

Browse files
committed
8296733: JFR: File Read event for RandomAccessFile::write(byte[]) is incorrect
Reviewed-by: clanger, mgronlun
1 parent 87b809a commit ced88a2

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
@@ -153,7 +153,7 @@ public void write(byte b[]) throws IOException {
153153
write(b);
154154
bytesWritten = b.length;
155155
} finally {
156-
long duration = EventConfiguration.timestamp();
156+
long duration = EventConfiguration.timestamp() - start;
157157
if (eventConfiguration.shouldCommit(duration)) {
158158
FileWriteEvent.commit(start, duration, path, bytesWritten);
159159
}

0 commit comments

Comments
 (0)