Skip to content

Commit b813735

Browse files
committed
Add more substitutions related to streaming in 17
1 parent 3a1fb79 commit b813735

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

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

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626

2727
import java.util.List;
2828

29+
import com.oracle.svm.core.jdk.JDK14OrLater;
2930
import com.oracle.svm.core.jdk.JDK15OrEarlier;
3031
import com.oracle.svm.core.jdk.JDK17OrLater;
32+
import com.oracle.svm.core.util.VMError;
3133
import org.graalvm.nativeimage.ProcessProperties;
3234

3335
import com.oracle.svm.core.SubstrateUtil;
@@ -38,7 +40,6 @@
3840
import com.oracle.svm.core.annotate.TargetElement;
3941
import com.oracle.svm.core.jdk.JDK14OrEarlier;
4042
import com.oracle.svm.core.jdk.JDK15OrLater;
41-
import com.oracle.svm.core.jdk.JDK17OrLater;
4243
import com.oracle.svm.jfr.traceid.JfrTraceId;
4344

4445
import jdk.jfr.Event;
@@ -372,8 +373,36 @@ public boolean shouldRotateDisk() {
372373

373374
/** See {@link JVM#flush}. */
374375
@Substitute
375-
@TargetElement(onlyWith = JDK15OrLater.class) //
376+
@TargetElement(onlyWith = JDK14OrLater.class) //
376377
public void flush() {
377378
// Temporarily do nothing. This is used for JFR streaming.
378379
}
380+
381+
/** See {@link JVM#include}. */
382+
@Substitute
383+
@TargetElement(onlyWith = JDK14OrLater.class) //
384+
public void include(Thread thread) {
385+
// Temporarily do nothing. This is used for JFR streaming.
386+
}
387+
388+
/** See {@link JVM#exclude}. */
389+
@Substitute
390+
@TargetElement(onlyWith = JDK14OrLater.class) //
391+
public void exclude(Thread thread) {
392+
// Temporarily do nothing. This is used for JFR streaming.
393+
}
394+
395+
/** See {@link JVM#isExcluded}. */
396+
@Substitute
397+
@TargetElement(onlyWith = JDK14OrLater.class) //
398+
public boolean isExcluded(Thread thread) {
399+
// Temporarily do nothing. This is used for JFR streaming.
400+
return false;
401+
}
402+
/** See {@link JVM#markChunkFinal}. */
403+
@Substitute
404+
@TargetElement(onlyWith = JDK14OrLater.class) //
405+
public void markChunkFinal() {
406+
// Temporarily do nothing. This is used for JFR streaming.
407+
}
379408
}

0 commit comments

Comments
 (0)