RFR: 8286441: Remove mode parameter from jdk.internal.perf.Perf.attach()
Alan Bateman
alanb at openjdk.java.net
Tue May 10 20:06:47 UTC 2022
On Tue, 10 May 2022 04:00:29 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> The `mode` parameter for ` jdk.internal.perf.Perf.attach()` has never supported the value `"rw"` since the source code was imported to the openjdk repo more than 15 years ago. In fact HotSpot throws `IllegalArgumentException` when such a mode is specified.
>
> It's unlikely such a mode will be required for future enhancements. Support for `"rw"` is removed. The "mode" parameter is also removed, since now `"r"` is the only supported mode.
>
> I also cleaned up related code in the JDK and HotSpot.
>
> Testing:
> - Passed tiers 1 and 2
> - Tiers 3, 4, 5 are in progress
I skimmed through the changes and I think they look okay. In the distant past there were tools outside of the JDK that used the jvmstat API directly. It's possible that VisualVM still does but it would only compile/run if --add-exports is used to export the sun.jvmstat.* packages. So it might be that dropping the parameter from a method in RemoteHost is noticed and I think that is okay because this package is not exported and is not meant to be used by code outside of the JDK.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8622
More information about the serviceability-dev
mailing list