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

Reviewed-by: clanger, mgronlun
This commit is contained in:
Erik Gahlin 2022-11-11 15:49:36 +00:00
parent 87b809a2cb
commit ced88a2fd9

View File

@ -153,7 +153,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);
}