Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit 55a239c

Browse files
committed
8296733: JFR: File Read event for RandomAccessFile::write(byte[]) is incorrect
Backport-of: ced88a2fd9a35e0e027661ef1f3c5ea3a5fff9e0
1 parent 647450e commit 55a239c

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
@@ -158,7 +158,7 @@ public void write(byte b[]) throws IOException {
158158
write(b);
159159
bytesWritten = b.length;
160160
} finally {
161-
long duration = EventConfiguration.timestamp();
161+
long duration = EventConfiguration.timestamp() - start;
162162
if (eventConfiguration.shouldCommit(duration)) {
163163
FileWriteEvent.commit(start, duration, path, bytesWritten);
164164
}

0 commit comments

Comments
 (0)