Skip to content

Commit 4601d82

Browse files
committed
svm; adopt JDK-8352648: JFR: 'jfr query' should not be available in product builds
1 parent e16641b commit 4601d82

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jfr/Target_jdk_jfr_internal_JVM.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,16 @@ public static long hostTotalSwapMemory() {
547547
/* Not implemented at the moment. */
548548
return -1;
549549
}
550+
551+
@Substitute
552+
@TargetElement(onlyWith = JDKLatest.class) //
553+
public static boolean isProduct() {
554+
/*
555+
* Currently only used for jdk.jfr.internal.tool.Command, which is not relevant for us. We
556+
* implement it nevertheless and return true to disable non-product features.
557+
*/
558+
return true;
559+
}
550560
}
551561

552562
class HasChunkRotationMonitorField implements BooleanSupplier {

0 commit comments

Comments
 (0)