diff options
| author | 2022-12-01 16:17:47 +0000 | |
|---|---|---|
| committer | 2022-12-02 15:00:55 +0000 | |
| commit | 7b97aebac851b345c7733d56ffe0fedf66010dbb (patch) | |
| tree | b1be8f0d36642d4d27e3e73dd63f24ba67ed7352 /runtime/native/dalvik_system_VMDebug.cc | |
| parent | 4c25ffc893541a4c3d5f6c077914633ca637406a (diff) | |
Remove class root duplicates from well known classes.
And get well known exception classes as declaring classes
of their constructors.
Also change function `ThreadForEnv()` to `Thread::ForEnv()`
and use it where appropriate, mostly in code added recently
while cleaning up well-known methods.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I2ededa429863a6cddbcbb879a223277fd6245557
Diffstat (limited to 'runtime/native/dalvik_system_VMDebug.cc')
| -rw-r--r-- | runtime/native/dalvik_system_VMDebug.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/native/dalvik_system_VMDebug.cc b/runtime/native/dalvik_system_VMDebug.cc index 2c651df646..d44fcc8c9c 100644 --- a/runtime/native/dalvik_system_VMDebug.cc +++ b/runtime/native/dalvik_system_VMDebug.cc @@ -48,14 +48,14 @@ #include "nativehelper/scoped_utf_chars.h" #include "scoped_fast_native_object_access-inl.h" #include "string_array_utils.h" +#include "thread-inl.h" #include "trace.h" namespace art { static jobjectArray VMDebug_getVmFeatureList(JNIEnv* env, jclass) { - Thread* self = down_cast<JNIEnvExt*>(env)->GetSelf(); - ScopedObjectAccess soa(self); - return soa.AddLocalReference<jobjectArray>(CreateStringArray(self, { + ScopedObjectAccess soa(Thread::ForEnv(env)); + return soa.AddLocalReference<jobjectArray>(CreateStringArray(soa.Self(), { "method-trace-profiling", "method-trace-profiling-streaming", "method-sample-profiling", @@ -380,7 +380,7 @@ static bool SetRuntimeStatValue(Thread* self, } static jobjectArray VMDebug_getRuntimeStatsInternal(JNIEnv* env, jclass) { - Thread* self = down_cast<JNIEnvExt*>(env)->GetSelf(); + Thread* self = Thread::ForEnv(env); ScopedObjectAccess soa(self); StackHandleScope<1u> hs(self); int32_t size = enum_cast<int32_t>(VMDebugRuntimeStatId::kNumRuntimeStats); |