Skip to content

Commit 1b6cffe

Browse files
Only return JVMTI env if native agents are enabled
1 parent 11dfda9 commit 1b6cffe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/EspressoOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ public Long apply(String size) {
640640
usageSyntax = "false|true") //
641641
public static final OptionKey<Boolean> EnableSignals = new OptionKey<>(false);
642642

643-
@Option(help = "Enables java agents. Support is currently very limited.", //
643+
@Option(help = "Enables native JVMTI agents. Support is currently very limited.", //
644644
category = OptionCategory.EXPERT, //
645645
stability = OptionStability.EXPERIMENTAL, //
646646
usageSyntax = "false|true") //

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/vm/VM.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,7 @@ public int GetEnv(@Pointer TruffleObject vmPtr_, @Pointer TruffleObject envPtr,
15931593
return JNI_ERR;
15941594
}
15951595
TruffleObject interopPtr = null;
1596-
if (JVMTI.isJvmtiVersion(version)) {
1596+
if (getContext().getEspressoEnv().EnableNativeAgents && JVMTI.isJvmtiVersion(version)) {
15971597
// JVMTI is requested before the main thread is created.
15981598
// Also note that every request of a JVMTI env returns a freshly created structure.
15991599
interopPtr = jvmti.create(version);

0 commit comments

Comments
 (0)