Skip to content

Commit 0e29436

Browse files
committed
svm: move @BasedOnJDKFile annotation to constructor [GR-59171]
1 parent 5337fde commit 0e29436

File tree

6 files changed

+7
-13
lines changed

6 files changed

+7
-13
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/attach/AttachListenerThread.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
* A dedicated listener thread that accepts client connections and that handles diagnostic command
4545
* requests. At the moment, only jcmd is supported.
4646
*/
47-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/services/attachListener.cpp#L453-L467")
4847
public abstract class AttachListenerThread extends Thread {
4948
private static final String JCMD_COMMAND_STRING = "jcmd";
5049
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/services/attachListener.hpp#L142") //
@@ -55,7 +54,7 @@ public abstract class AttachListenerThread extends Thread {
5554
protected static final int ARG_COUNT_MAX = 3;
5655

5756
@SuppressWarnings("this-escape")
58-
// This constructor should be annotated with @BasedOnJDK instead of the class, see GR-59171.
57+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/services/attachListener.cpp#L453-L467")
5958
public AttachListenerThread() {
6059
super(PlatformThreads.singleton().systemGroup, "Attach Listener");
6160
this.setDaemon(true);

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/dcmd/JfrCheckDCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@
3535
import com.oracle.svm.core.jfr.Target_jdk_jfr_internal_dcmd_AbstractDCmd;
3636
import com.oracle.svm.core.util.BasedOnJDKFile;
3737

38-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp#L106-L108")
3938
public class JfrCheckDCmd extends AbstractJfrDCmd {
40-
// This constructor should be annotated with @BasedOnJDK instead of the class, see GR-59171.
4139
@Platforms(Platform.HOSTED_ONLY.class)
40+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp#L106-L108")
4241
public JfrCheckDCmd() {
4342
super("JFR.check", "Checks running JFR recording(s)", Impact.Low);
4443
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/dcmd/JfrDumpDCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@
3535
import com.oracle.svm.core.jfr.Target_jdk_jfr_internal_dcmd_AbstractDCmd;
3636
import com.oracle.svm.core.util.BasedOnJDKFile;
3737

38-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp#L81-L83")
3938
public class JfrDumpDCmd extends AbstractJfrDCmd {
40-
// This constructor should be annotated with @BasedOnJDK instead of the class, see GR-59171.
4139
@Platforms(Platform.HOSTED_ONLY.class)
40+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp#L81-L83")
4241
public JfrDumpDCmd() {
4342
super("JFR.dump", "Copies contents of a JFR recording to file. Either the name or the recording id must be specified.", Impact.Medium);
4443
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/dcmd/JfrStartDCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@
3434
import com.oracle.svm.core.jfr.Target_jdk_jfr_internal_dcmd_DCmdStart;
3535
import com.oracle.svm.core.util.BasedOnJDKFile;
3636

37-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp#L56-L58")
3837
public class JfrStartDCmd extends AbstractJfrDCmd {
39-
// This constructor should be annotated with @BasedOnJDK instead of the class, see GR-59171.
4038
@Platforms(Platform.HOSTED_ONLY.class)
39+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp#L56-L58")
4140
public JfrStartDCmd() {
4241
super("JFR.start", "Starts a new JFR recording.", Impact.Medium);
4342
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/dcmd/JfrStopDCmd.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@
3535
import com.oracle.svm.core.jfr.Target_jdk_jfr_internal_dcmd_AbstractDCmd;
3636
import com.oracle.svm.core.util.BasedOnJDKFile;
3737

38-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp#L131-L133")
3938
public class JfrStopDCmd extends AbstractJfrDCmd {
40-
// This constructor should be annotated with @BasedOnJDK instead of the class, see GR-59171.
4139
@Platforms(Platform.HOSTED_ONLY.class)
40+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/jfr/dcmd/jfrDcmds.hpp#L131-L133")
4241
public JfrStopDCmd() {
4342
super("JFR.stop", "Stops a JFR recording.", Impact.Low);
4443
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/dcmd/VMNativeMemoryDCmd.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@
3232
import com.oracle.svm.core.nmt.NativeMemoryTracking;
3333
import com.oracle.svm.core.util.BasedOnJDKFile;
3434

35-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/nmt/nmtDCmd.hpp#L49-L52")
36-
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/nmt/nmtDCmd.cpp#L34-L64")
3735
public class VMNativeMemoryDCmd extends AbstractDCmd {
3836
private static final DCmdOption<Boolean> SUMMARY = new DCmdOption<>(Boolean.class, "summary",
3937
"Request runtime to report current memory summary, which includes total reserved and committed memory, along with memory usage summary by each subsystem.",
4038
false, false);
4139

42-
// This constructor should be annotated with @BasedOnJDK instead of the class, see GR-59171.
4340
@Platforms(Platform.HOSTED_ONLY.class)
41+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/nmt/nmtDCmd.hpp#L49-L52")
42+
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-24+18/src/hotspot/share/nmt/nmtDCmd.cpp#L34-L64")
4443
public VMNativeMemoryDCmd() {
4544
super("VM.native_memory", "Print native memory usage", Impact.Low, new DCmdOption<?>[0], new DCmdOption<?>[]{SUMMARY},
4645
new String[]{"$ jcmd <pid> VM.native_memory summary"});

0 commit comments

Comments
 (0)