RFR: 8329138: Convert JFR FileForceEvent to static mirror event

Alan Bateman alanb at openjdk.org
Sat Mar 30 10:08:30 UTC 2024


On Fri, 29 Mar 2024 00:52:46 GMT, Tim Prinzing <tprinzing at openjdk.org> wrote:

> Currently the JFR event FileForceEvent is generated by instrumenting the sun.nio.ch.FileChannelImpl class. This needs to be changed to use the newer mirror events with static methods.
> 
> Added the event at jdk.internal.event.FileForceEvent, and changed jdk.jfr.events.FileForceEvent to be a mirror event.
> 
> Updated FileChannelImpl to use the jdk internal event static methods, and removed the force() method from FileChannelImplInstrumentor.
> 
> Uses the existing tests.

> It looks like adding a file descriptor property to the event is needed, and there would be no file path in those cases.

The AsynchonrousFileChannel implementations can keep a reference to the file path, that should be easy. FileDescriptor.sync does need more thought, maybe it's not worth doing.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18542#issuecomment-2028000449


More information about the nio-dev mailing list