On Fri, 31 Mar 2023 08:24:19 GMT, Kevin Walls <kev...@openjdk.org> wrote:
> The Permissions in DCmds relate to remote usage over JMX. > "monitor" is generally for reading information, and "control" is generally > for making changes. > The DCmds for changing compiler directives should have "control" as the > required permission. > > Tests in test/hotspot/jtreg/serviceability/dcmd/compiler and > test/hotspot/jtreg/compiler/compilercontrol still pass with this change. Right, I don't think we test this remotely, and I don't think we test it with permissions. We have test/hotspot/jtreg/serviceability/dcmd/compiler/CompilerDirectivesDCMDTest.java which uses test/lib/jdk/test/lib/dcmd/JMXExecutor.java ...where JMXExecutor implements a CommandExecutor passed to the test's run method and the test does things like: executor.execute("Compiler.directives_clear"); CompilerDirectivesDCMDTest currently tests local usage in the running VM, which is fine and this change does not affect it. I don't really think this feature (remote, permissions) is likely to be actively used, as it is not well documented, so this change is just to try and correct the record of the intent of the feature. I think additional testing should come as a next step as we make changes to the implementation required by the upcoming removal of Security Manager and related APIs. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13262#issuecomment-1493278465