diff options
| author | 2022-08-10 04:34:22 +0000 | |
|---|---|---|
| committer | 2022-08-10 04:34:22 +0000 | |
| commit | 7d97b03d77ad3ede77813cec449f9f333da6ac18 (patch) | |
| tree | c1dddd4d2efba7ad5fcd395807591f35e2f0ebcd /openjdkjvmti/art_jvmti.h | |
| parent | f5545a9773fbd676795f4366039326088921abcb (diff) | |
| parent | 6ecfa91a040bb1a58e57ad99ab2765cd911e845a (diff) | |
Update instrumentation support for non-java debuggable runtimes am: 6ecfa91a04
Original change: https://android-review.googlesource.com/c/platform/art/+/2169088
Change-Id: I1086ee1b27c5a86b4d8a2af14ffe1d52c9044c4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'openjdkjvmti/art_jvmti.h')
| -rw-r--r-- | openjdkjvmti/art_jvmti.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openjdkjvmti/art_jvmti.h b/openjdkjvmti/art_jvmti.h index cdda09b9e7..bc965a232f 100644 --- a/openjdkjvmti/art_jvmti.h +++ b/openjdkjvmti/art_jvmti.h @@ -47,9 +47,11 @@ #include "base/strlcpy.h" #include "base/mutex.h" #include "events.h" +#include "instrumentation.h" #include "jni/java_vm_ext.h" #include "jni/jni_env_ext.h" #include "jvmti.h" +#include "runtime.h" #include "ti_breakpoint.h" namespace art { @@ -69,6 +71,13 @@ class ObjectTagTable; // This is the value 0x70010200. static constexpr jint kArtTiVersion = JVMTI_VERSION_1_2 | 0x40000000; +// Returns whether we are able to use all jvmti features. +static inline bool IsFullJvmtiAvailable() { + art::Runtime* runtime = art::Runtime::Current(); + return runtime->GetInstrumentation()->IsForcedInterpretOnly() || + runtime->IsJavaDebuggableAtInit(); +} + // A structure that is a jvmtiEnv with additional information for the runtime. struct ArtJvmTiEnv : public jvmtiEnv { art::JavaVMExt* art_vm; |