RFR: 8329138: Convert JFR FileForceEvent to static mirror event
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. ------------- Commit messages: - javadoc fixup - remove mirrors from JDKEvents - 8329138: Convert JFR FileForceEvent to static mirror event Changes: https://git.openjdk.org/jdk/pull/18542/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8329138 Stats: 159 lines in 7 files changed: 123 ins; 30 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/18542.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18542/head:pull/18542 PR: https://git.openjdk.org/jdk/pull/18542
On Fri, 29 Mar 2024 00:52:46 GMT, Tim Prinzing <tprinzing@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.
The other two places that should probably emit this event are FileDescriptor.sync and AsynchonrousFileChannel.force. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18542#issuecomment-2026460366
On Fri, 29 Mar 2024 00:52:46 GMT, Tim Prinzing <tprinzing@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.
Okay, I'll update those two places to emit the event. It looks like adding a file descriptor property to the event is needed, and there would be no file path in those cases. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18542#issuecomment-2027722419
On Fri, 29 Mar 2024 00:52:46 GMT, Tim Prinzing <tprinzing@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
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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: Add support for AsynchronousFileChannel.force(). ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18542/files - new: https://git.openjdk.org/jdk/pull/18542/files/005db0df..8e20527e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=00-01 Stats: 124 lines in 5 files changed: 111 ins; 3 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/18542.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18542/head:pull/18542 PR: https://git.openjdk.org/jdk/pull/18542
On Mon, 1 Apr 2024 23:37:21 GMT, Tim Prinzing <tprinzing@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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision:
Add support for AsynchronousFileChannel.force().
src/java.base/share/classes/jdk/internal/event/FileForceEvent.java line 35:
33: * {@link #commit(long, long, String, boolean)} method 34: * must be the same as the order of the fields. 35: */
You may have to re-word this comment to avoid confusion with the metaData parameter. That is, there is event metaData and there is file metaData, if you see what I mean. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1547136136
On Tue, 2 Apr 2024 04:48:37 GMT, Alan Bateman <alanb@openjdk.org> wrote:
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision:
Add support for AsynchronousFileChannel.force().
src/java.base/share/classes/jdk/internal/event/FileForceEvent.java line 35:
33: * {@link #commit(long, long, String, boolean)} method 34: * must be the same as the order of the fields. 35: */
You may have to re-word this comment to avoid confusion with the metaData parameter. That is, there is event meta data and there is file metaData, if you see what I mean.
I see what you mean. I reworded the javadoc.
test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java line 50:
48: 49: public static void main(String[] args) throws Throwable { 50: File blah = File.createTempFile("blah", null);
Can you change this to use the tests's scratch rather that /tmp, meaning `Files.createTempFile(Path.of("."), "blah", "jfr")`. That way the recording is available in the event that the test fails.
I'm not sure what you mean about the recording. The file is the AsynchronousFileChannel under test and does not contain the event recording.
test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java line 64:
62: 63: data.flip(); 64: ch.write(data, 0);
This just initiates the write operation, it doesn't wait until it completes. It returns a Future so adding .get() will ensure that it waits and that there is potentially data to write back to the file system.
I do realize the write doesn't wait. I was under the impression that flush() does wait until everything has been flushed to disk. I went ahead and added .get() as requested. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1566405842 PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1566413683 PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1566409791
On Mon, 15 Apr 2024 20:39:26 GMT, Tim Prinzing <tprinzing@openjdk.org> wrote:
test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java line 64:
62: 63: data.flip(); 64: ch.write(data, 0);
This just initiates the write operation, it doesn't wait until it completes. It returns a Future so adding .get() will ensure that it waits and that there is potentially data to write back to the file system.
I do realize the write doesn't wait. I was under the impression that flush() does wait until everything has been flushed to disk. I went ahead and added .get() as requested.
In this API, the read/write methods are asynchronous, the force method is synchronous. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1566784789
On Mon, 15 Apr 2024 20:41:10 GMT, Tim Prinzing <tprinzing@openjdk.org> wrote:
test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java line 50:
48: 49: public static void main(String[] args) throws Throwable { 50: File blah = File.createTempFile("blah", null);
Can you change this to use the tests's scratch rather that /tmp, meaning `Files.createTempFile(Path.of("."), "blah", "jfr")`. That way the file is available in the event that the test fails.
I'm not sure what you mean about the recording. The file is the AsynchronousFileChannel under test and does not contain the event recording.
It's anyway better to create temporary files in the test scratch directory rather than in /tmp. This way the temp files get cleaned up with the test, and there less chances of conflicts if several tests are running concurrently (and less chances on slowly filling up /tmp onthe machine if clean up actions fail) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1567596755
On Tue, 16 Apr 2024 15:49:08 GMT, Daniel Fuchs <dfuchs@openjdk.org> wrote:
I'm not sure what you mean about the recording. The file is the AsynchronousFileChannel under test and does not contain the event recording.
It's anyway better to create temporary files in the test scratch directory rather than in /tmp. This way the temp files get cleaned up with the test, and there less chances of conflicts if several tests are running concurrently (and less chances on slowly filling up /tmp onthe machine if clean up actions fail)
I moved it to the tests scratch area ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1568102079
On Mon, 1 Apr 2024 23:37:21 GMT, Tim Prinzing <tprinzing@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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision:
Add support for AsynchronousFileChannel.force().
test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java line 50:
48: 49: public static void main(String[] args) throws Throwable { 50: File blah = File.createTempFile("blah", null);
Can you change this to use the tests's scratch rather that /tmp, meaning `Files.createTempFile(Path.of("."), "blah", "jfr")`. That way the recording is available in the event that the test fails. test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java line 64:
62: 63: data.flip(); 64: ch.write(data, 0);
This just initiates the write operation, it doesn't wait until it completes. It returns a Future so adding .get() will ensure that it waits and that there is potentially data to write back to the file system. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1547139762 PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1547138525
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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: requested changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18542/files - new: https://git.openjdk.org/jdk/pull/18542/files/8e20527e..6903c823 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=01-02 Stats: 7 lines in 2 files changed: 4 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/18542.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18542/head:pull/18542 PR: https://git.openjdk.org/jdk/pull/18542
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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: fix windows build issue ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18542/files - new: https://git.openjdk.org/jdk/pull/18542/files/6903c823..70815943 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=02-03 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/18542.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18542/head:pull/18542 PR: https://git.openjdk.org/jdk/pull/18542
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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: test file local to test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18542/files - new: https://git.openjdk.org/jdk/pull/18542/files/70815943..366fca19 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=03-04 Stats: 5 lines in 1 file changed: 1 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/18542.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18542/head:pull/18542 PR: https://git.openjdk.org/jdk/pull/18542
On Wed, 17 Apr 2024 01:34:07 GMT, Tim Prinzing <tprinzing@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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision:
test file local to test
My comments have been addressed and I don't have any else to add. I assume @egahlin will cast an eye over this too. ------------- Marked as reviewed by alanb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18542#pullrequestreview-2008938324
On Wed, 17 Apr 2024 01:34:07 GMT, Tim Prinzing <tprinzing@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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision:
test file local to test
Sorry - just noticed this comment has been pending for a few days... src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java line 66:
64: FileWriteEvent.class, 65: SocketReadEvent.class, 66: SocketWriteEvent.class,
I'm guessing that this change which remove these two event classes is a drive-by-cleanup that should actually have been done with some previous fix in this area? Just wanted to double check it was intended as it doesn't seem to be related to file events. ------------- PR Review: https://git.openjdk.org/jdk/pull/18542#pullrequestreview-2006152864 PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1568907662
On Wed, 17 Apr 2024 14:05:28 GMT, Daniel Fuchs <dfuchs@openjdk.org> wrote:
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision:
test file local to test
src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java line 66:
64: FileWriteEvent.class, 65: SocketReadEvent.class, 66: SocketWriteEvent.class,
I'm guessing that this change which remove these two event classes is a drive-by-cleanup that should actually have been done with some previous fix in this area? Just wanted to double check it was intended as it doesn't seem to be related to file events.
Yes, and I think it might be the cause for https://bugs.openjdk.org/browse/JDK-8329330 I will send out a PR to remove those separately (in 30 minutes) so a fix can be backported. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1570887596
On Thu, 18 Apr 2024 14:32:28 GMT, Erik Gahlin <egahlin@openjdk.org> wrote:
src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java line 66:
64: FileWriteEvent.class, 65: SocketReadEvent.class, 66: SocketWriteEvent.class,
I'm guessing that this change which remove these two event classes is a drive-by-cleanup that should actually have been done with some previous fix in this area? Just wanted to double check it was intended as it doesn't seem to be related to file events.
I think it might be the cause for https://bugs.openjdk.org/browse/JDK-8329330 I have sent out a PR to remove those separately so the fix can be backported. https://github.com/openjdk/jdk/pull/18843
That's correct, it is an unrelated cleanup (other than it seems to cause tests to fail now). @egahlin, do you want me to remove those from this PR? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1570953838
On Thu, 18 Apr 2024 15:14:10 GMT, Tim Prinzing <tprinzing@openjdk.org> wrote:
I think it might be the cause for https://bugs.openjdk.org/browse/JDK-8329330 I have sent out a PR to remove those separately so the fix can be backported. https://github.com/openjdk/jdk/pull/18843
That's correct, it is an unrelated cleanup (other than it seems to cause tests to fail now). @egahlin, do you want me to remove those from this PR?
Yes, it would be good if you could remove those changes, so it can be handled separately. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1570979943
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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: undo fix being handled in JDK-8329330. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18542/files - new: https://git.openjdk.org/jdk/pull/18542/files/366fca19..28bf429d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=04-05 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/18542.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18542/head:pull/18542 PR: https://git.openjdk.org/jdk/pull/18542
On Thu, 18 Apr 2024 18:46:36 GMT, Tim Prinzing <tprinzing@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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision:
undo fix being handled in JDK-8329330.
Prior to the last commit, this passed all tests tier 1-3 on all platform. It should be ready. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18542#issuecomment-2064929545
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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: IntelliJ trying to help ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18542/files - new: https://git.openjdk.org/jdk/pull/18542/files/28bf429d..17b0be7b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=05-06 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/18542.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18542/head:pull/18542 PR: https://git.openjdk.org/jdk/pull/18542
On Thu, 18 Apr 2024 18:59:20 GMT, Tim Prinzing <tprinzing@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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision:
IntelliJ trying to help
Marked as reviewed by egahlin (Reviewer). src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/JDKEvents.java line 46:
44: import jdk.jfr.events.FileWriteEvent; 45: import jdk.jfr.events.InitialSecurityPropertyEvent; 46:
Unnecessary blank line added. ------------- PR Review: https://git.openjdk.org/jdk/pull/18542#pullrequestreview-2009830262 PR Review Comment: https://git.openjdk.org/jdk/pull/18542#discussion_r1571335968
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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: remove unecessary blank line ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18542/files - new: https://git.openjdk.org/jdk/pull/18542/files/17b0be7b..f7859fc4 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=06-07 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/18542.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18542/head:pull/18542 PR: https://git.openjdk.org/jdk/pull/18542
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.
Tim Prinzing has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits: - Merge branch 'refs/heads/master' into JDK-8329138 - remove unecessary blank line - IntelliJ trying to help - undo fix being handled in JDK-8329330. - test file local to test - fix windows build issue - requested changes - Add support for AsynchronousFileChannel.force(). - javadoc fixup - remove mirrors from JDKEvents - ... and 1 more: https://git.openjdk.org/jdk/compare/819f3d6f...743b92a6 ------------- Changes: https://git.openjdk.org/jdk/pull/18542/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=08 Stats: 279 lines in 12 files changed: 238 ins; 27 del; 14 mod Patch: https://git.openjdk.org/jdk/pull/18542.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18542/head:pull/18542 PR: https://git.openjdk.org/jdk/pull/18542
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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision: fix mistake in merge ------------- Changes: - all: https://git.openjdk.org/jdk/pull/18542/files - new: https://git.openjdk.org/jdk/pull/18542/files/743b92a6..8bc34431 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18542&range=08-09 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/18542.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18542/head:pull/18542 PR: https://git.openjdk.org/jdk/pull/18542
On Mon, 29 Apr 2024 20:01:38 GMT, Tim Prinzing <tprinzing@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.
Tim Prinzing has updated the pull request incrementally with one additional commit since the last revision:
fix mistake in merge
I went ahead and ran teir1 through teir3 tests on everything after the merge. Everything passes so this is ready for integration. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18542#issuecomment-2083946114
On Fri, 29 Mar 2024 00:52:46 GMT, Tim Prinzing <tprinzing@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.
This pull request has now been integrated. Changeset: f4caac8d Author: Tim Prinzing <tprinzing@openjdk.org> Committer: Alan Bateman <alanb@openjdk.org> URL: https://git.openjdk.org/jdk/commit/f4caac8dea1c95234743712386cb28a1ecb11197 Stats: 280 lines in 12 files changed: 238 ins; 28 del; 14 mod 8329138: Convert JFR FileForceEvent to static mirror event Reviewed-by: alanb, egahlin ------------- PR: https://git.openjdk.org/jdk/pull/18542
participants (4)
-
Alan Bateman
-
Daniel Fuchs
-
Erik Gahlin
-
Tim Prinzing