8296733: JFR: File Read event for RandomAccessFile::write(byte[]) is incorrect

Backport-of: ced88a2fd9a35e0e027661ef1f3c5ea3a5fff9e0
This commit is contained in:
Christoph Langer 2022-11-17 22:15:22 +00:00
parent 647450e75d
commit 55a239c7a6

View File

@ -158,7 +158,7 @@ final class RandomAccessFileInstrumentor {
write(b);
bytesWritten = b.length;
} finally {
long duration = EventConfiguration.timestamp();
long duration = EventConfiguration.timestamp() - start;
if (eventConfiguration.shouldCommit(duration)) {
FileWriteEvent.commit(start, duration, path, bytesWritten);
}