Home
last modified time | relevance | path

Searched refs:env_ (Results 1 – 21 of 21) sorted by relevance

/art/test/ti-agent/
Dscoped_utf_chars.h32 ScopedUtfChars(JNIEnv* env, jstring s) : env_(env), string_(s) { in ScopedUtfChars()
42 env_(rhs.env_), string_(rhs.string_), utf_chars_(rhs.utf_chars_) { in ScopedUtfChars()
43 rhs.env_ = nullptr; in ScopedUtfChars()
50 env_->ReleaseStringUTFChars(string_, utf_chars_); in ~ScopedUtfChars()
60 env_ = rhs.env_;
63 rhs.env_ = nullptr;
83 JNIEnv* env_;
Djvmti_helper.h50 JvmtiDeleter() : env_(nullptr) {} in JvmtiDeleter()
51 explicit JvmtiDeleter(jvmtiEnv* env) : env_(env) {} in JvmtiDeleter()
58 CHECK(env_ != nullptr); in operator()
59 jvmtiError ret = env_->Deallocate(ptr); in operator()
60 CheckJvmtiError(env_, ret); in operator()
64 mutable jvmtiEnv* env_;
Dtrace_helper.cc58 : jnienv_(jnienv), env_(env), thr_(thr) { in ScopedCallbackState()
59 CHECK(!IsInCallback(jnienv_, env_, thr_)); in ScopedCallbackState()
60 SetInCallback(jnienv_, env_, thr_, true); in ScopedCallbackState()
63 CHECK(IsInCallback(jnienv_, env_, thr_)); in ~ScopedCallbackState()
64 SetInCallback(jnienv_, env_, thr_, false); in ~ScopedCallbackState()
69 jvmtiEnv* env_; member in art::common_trace::ScopedCallbackState
/art/openjdkjvmti/
Djvmti_allocator.h58 explicit JvmtiAllocator(jvmtiEnv* env) : env_(env) {} in JvmtiAllocator()
59 JvmtiAllocator() : env_(nullptr) {} in JvmtiAllocator()
63 : env_(other.env_) {} in JvmtiAllocator()
70 jvmtiEnv* env_;
95 explicit JvmtiAllocator(jvmtiEnv* env) : env_(env) {} in JvmtiAllocator()
96 JvmtiAllocator() : env_(nullptr) {} in JvmtiAllocator()
100 : env_(other.env_) {} in JvmtiAllocator()
115 if (env_ == nullptr) {
121 jvmtiError alloc_error = env_->Allocate(n * sizeof(T), &result);
127 if (env_ == nullptr) { in deallocate()
[all …]
Dti_logging.h67 : env_(ArtJvmTiEnv::AsArtJvmTiEnv(env)), in JvmtiLogMessage()
70 DCHECK(env_ != nullptr); in JvmtiLogMessage()
74 art::MutexLock mu(art::Thread::Current(), env_->last_error_mutex_); in ~JvmtiLogMessage()
75 env_->last_error_ = save_stream_.str(); in ~JvmtiLogMessage()
86 ArtJvmTiEnv* env_;
Dart_jvmti.h140 JvmtiDeleter() : env_(nullptr) {} in JvmtiDeleter()
141 explicit JvmtiDeleter(jvmtiEnv* env) : env_(env) {} in JvmtiDeleter()
148 CHECK(env_ != nullptr); in operator()
149 jvmtiError ret = env_->Deallocate(reinterpret_cast<unsigned char*>(ptr)); in operator()
154 mutable jvmtiEnv* env_;
160 JvmtiDeleter() : env_(nullptr) {} in JvmtiDeleter()
161 explicit JvmtiDeleter(jvmtiEnv* env) : env_(env) {} in JvmtiDeleter()
169 CHECK(env_ != nullptr); in operator()
170 jvmtiError ret = env_->Deallocate(reinterpret_cast<unsigned char*>(ptr)); in operator()
175 mutable jvmtiEnv* env_;
Devents-inl.h58 ScopedEventDispatchEnvironment() : env_(nullptr), throw_(nullptr, nullptr) { in ScopedEventDispatchEnvironment()
63 : env_(env), in ScopedEventDispatchEnvironment()
64 throw_(env_, env_->ExceptionOccurred()) { in ScopedEventDispatchEnvironment()
68 env_->PushLocalFrame(128); in ScopedEventDispatchEnvironment()
69 env_->ExceptionClear(); in ScopedEventDispatchEnvironment()
73 if (env_ != nullptr) { in ~ScopedEventDispatchEnvironment()
74 if (throw_.get() != nullptr && !env_->ExceptionCheck()) { in ~ScopedEventDispatchEnvironment()
77 env_->Throw(throw_.get()); in ~ScopedEventDispatchEnvironment()
79 env_->PopLocalFrame(nullptr); in ~ScopedEventDispatchEnvironment()
85 JNIEnv* env_;
[all …]
Dti_redefine.h207 ArtJvmTiEnv* env_; variable
220 : env_(env), in Redefiner()
Dti_redefine.cc1297 BreakpointUtil::RemoveBreakpointsInClass(driver_->env_, GetMirrorClass().Ptr()); in UnregisterJvmtiBreakpoints()
/art/test/004-JniTest/
Djni_test.cc393 : env_(env), in JniCallNonvirtualVoidMethodTest()
413 JNIEnv* const env_; member in art::JniCallNonvirtualVoidMethodTest
433 jclass c = env_->FindClass(class_name); in GetClass()
434 if (env_->ExceptionCheck()) { in GetClass()
435 env_->ExceptionDescribe(); in GetClass()
436 env_->FatalError(__FUNCTION__); in GetClass()
438 CHECK(!env_->ExceptionCheck()); in GetClass()
445 env_->GetMethodID(c, method_name, "()V") : in GetMethodID()
446 env_->GetStaticMethodID(c, method_name, "()V")); in GetMethodID()
447 if (env_->ExceptionCheck()) { in GetMethodID()
[all …]
/art/compiler/jni/
Djni_compiler_test.cc301 env_ = Thread::Current()->GetJniEnv(); in SetUpForTest()
302 jklass_ = env_->FindClass("MyClassNatives"); in SetUpForTest()
306 jmethod_ = env_->GetStaticMethodID(jklass_, method_name, method_sig); in SetUpForTest()
308 jmethod_ = env_->GetMethodID(jklass_, method_name, method_sig); in SetUpForTest()
314 ASSERT_EQ(JNI_OK, env_->RegisterNatives(jklass_, methods, 1)) in SetUpForTest()
317 env_->UnregisterNatives(jklass_); in SetUpForTest()
320 jmethodID constructor = env_->GetMethodID(jklass_, "<init>", "()V"); in SetUpForTest()
321 jobj_ = env_->NewObject(jklass_, constructor); in SetUpForTest()
381 JNIEnv* env_; member in art::JniCompilerTest
646 env_->CallNonvirtualVoidMethod(jobj_, jklass_, jmethod_); in CompileAndRunNoArgMethodImpl()
[all …]
/art/runtime/
Dreflection_test.cc45 vm_->AttachCurrentThread(&env_, nullptr); in SetUp()
47 ScopedLocalRef<jclass> aioobe(env_, in SetUp()
48 env_->FindClass("java/lang/ArrayIndexOutOfBoundsException")); in SetUp()
50 aioobe_ = reinterpret_cast<jclass>(env_->NewGlobalRef(aioobe.get())); in SetUp()
52 ScopedLocalRef<jclass> ase(env_, env_->FindClass("java/lang/ArrayStoreException")); in SetUp()
54 ase_ = reinterpret_cast<jclass>(env_->NewGlobalRef(ase.get())); in SetUp()
56 ScopedLocalRef<jclass> sioobe(env_, in SetUp()
57 env_->FindClass("java/lang/StringIndexOutOfBoundsException")); in SetUp()
59 sioobe_ = reinterpret_cast<jclass>(env_->NewGlobalRef(sioobe.get())); in SetUp()
64 env_->DeleteGlobalRef(aioobe_); in CleanUpJniEnv()
[all …]
Dscoped_thread_state_change-inl.h101 : self_(ThreadForEnv(env)), env_(down_cast<JNIEnvExt*>(env)), vm_(env_->GetVm()) {} in ScopedObjectAccessAlreadyRunnable()
105 env_(down_cast<JNIEnvExt*>(self->GetJniEnv())), in ScopedObjectAccessAlreadyRunnable()
106 vm_(env_ != nullptr ? env_->GetVm() : nullptr) {} in ScopedObjectAccessAlreadyRunnable()
Dscoped_thread_state_change.h76 return env_; in Env()
115 : self_(nullptr), env_(nullptr), vm_(reinterpret_cast<JavaVMExt*>(vm)) {} in ScopedObjectAccessAlreadyRunnable()
126 JNIEnvExt* const env_; variable
/art/dex2oat/driver/
Dcompiler_driver_test.cc60 env_ = Thread::Current()->GetJniEnv(); in EnsureCompiled()
61 class_ = env_->FindClass(class_name); in EnsureCompiled()
64 mid_ = env_->GetMethodID(class_, method, signature); in EnsureCompiled()
66 mid_ = env_->GetStaticMethodID(class_, method, signature); in EnsureCompiled()
111 JNIEnv* env_; member in art::CompilerDriverTest
177 jclass c_class = env_->FindClass("ConcreteClass"); in TEST_F()
179 jmethodID constructor = env_->GetMethodID(c_class, "<init>", "()V"); in TEST_F()
181 jobject jobj_ = env_->NewObject(c_class, constructor); in TEST_F()
185 env_->CallNonvirtualVoidMethod(jobj_, class_, mid_); in TEST_F()
187 EXPECT_EQ(env_->ExceptionCheck(), JNI_TRUE); in TEST_F()
[all …]
/art/runtime/jni/
Djni_env_ext.h213 env_(env), in ScopedJniEnvLocalRefState()
219 env_->locals_.SetSegmentState(env_->local_ref_cookie_); in ~ScopedJniEnvLocalRefState()
220 env_->local_ref_cookie_ = saved_local_ref_cookie_; in ~ScopedJniEnvLocalRefState()
224 JNIEnvExt* const env_;
/art/tools/jvmti-agents/titrace/
Dtitrace.cc46 explicit TiMemory(jvmtiEnv* env, T* mem, size_t size) : env_(env), mem_(mem), size_(size) { in TiMemory()
51 env_->Deallocate(static_cast<unsigned char*>(mem_)); in ~TiMemory()
58 env_ = other.env_; in TiMemory()
63 other.env_ = nullptr; in TiMemory()
86 jvmtiEnv* env_; member
/art/tools/jvmti-agents/breakpoint-logger/
Dbreakpoint_logger.cc74 : jvmti_env_(jvmti_env), env_(env), free_name_(false) { in ScopedThreadInfo()
89 env_->DeleteLocalRef(info_.thread_group); in ~ScopedThreadInfo()
90 env_->DeleteLocalRef(info_.context_class_loader); in ~ScopedThreadInfo()
99 JNIEnv* env_; member in breakpoint_logger::ScopedThreadInfo
177 env_(env), in ScopedMethodInfo()
187 env_->DeleteLocalRef(declaring_class_); in ~ScopedMethodInfo()
240 JNIEnv* env_; member in breakpoint_logger::ScopedMethodInfo
/art/test/ti-stress/
Dstress.cc124 : jvmtienv_(jvmtienv), env_(env), free_name_(false) { in ScopedThreadInfo()
139 DeleteLocalRef(env_, info_.thread_group); in ~ScopedThreadInfo()
140 DeleteLocalRef(env_, info_.context_class_loader); in ~ScopedThreadInfo()
149 JNIEnv* env_; member in art::ScopedThreadInfo
219 env_(env), in ScopedMethodInfo()
228 DeleteLocalRef(env_, declaring_class_); in ~ScopedMethodInfo()
276 JNIEnv* env_; member in art::ScopedMethodInfo
/art/tools/jvmti-agents/ti-fast/
Dtifast.cc135 : jvmtienv_(jvmtienv), env_(env), free_name_(false) { in ScopedThreadInfo()
149 DeleteLocalRef(env_, info_.thread_group); in ~ScopedThreadInfo()
150 DeleteLocalRef(env_, info_.context_class_loader); in ~ScopedThreadInfo()
159 JNIEnv* env_; member in tifast::__anon4fd488430111::ScopedThreadInfo
239 : jvmtienv_(jvmtienv), env_(env), method_(m) {} in ScopedMethodInfo()
242 DeleteLocalRef(env_, declaring_class_); in ~ScopedMethodInfo()
295 JNIEnv* env_; member in tifast::__anon4fd488430111::ScopedMethodInfo
/art/runtime/native/
Ddalvik_system_DexFile.cc223 ScopedIntArrayAccessor(JNIEnv* env, jintArray arr) : env_(env), array_(arr) { in ScopedIntArrayAccessor()
224 elements_ = env_->GetIntArrayElements(array_, /* isCopy= */ nullptr); in ScopedIntArrayAccessor()
229 env_->ReleaseIntArrayElements(array_, elements_, JNI_ABORT); in ~ScopedIntArrayAccessor()
235 JNIEnv* env_; member