Lines Matching defs:library

105    * Check the result of an earlier call to JNI_OnLoad on this library.
118 LOG(INFO) << *self << " recursive attempt to load library " << "\"" << path_ << "\"";
184 // Path to library "/system/lib/libjni.so".
193 // The ClassLoader this library is associated with, a weak global JNI reference that is
194 // created/deleted with the scope of the library.
225 for (const auto& library : libraries_) {
230 os << library.first;
243 void Put(const std::string& path, SharedLibrary* library)
245 libraries_.Put(path, library);
288 SharedLibrary* const library = lib.second;
290 if (library->GetClassLoaderAllocator() != declaring_class_loader_allocator) {
295 const char* arg_shorty = library->NeedsNativeBridge() ? shorty : nullptr;
296 void* fn = library->FindSymbol(jni_short_name, arg_shorty);
298 fn = library->FindSymbol(jni_long_name, arg_shorty);
302 << " in \"" << library->GetPath() << "\"]";
318 SharedLibrary* const library = it->second;
320 const jweak class_loader = library->GetClassLoader();
324 unload_libraries.push_back(library);
334 for (auto library : unload_libraries) {
335 void* const sym = library->FindSymbol("JNI_OnUnload", nullptr);
337 VLOG(jni) << "[No JNI_OnUnload found in \"" << library->GetPath() << "\"]";
339 VLOG(jni) << "[JNI_OnUnload found for \"" << library->GetPath() << "\"]: Calling...";
343 delete library;
860 // See if we've already loaded this library. If we have, and the class loader
864 SharedLibrary* library;
869 library = libraries_->Get(path);
887 if (library != nullptr) {
889 if (library->GetClassLoaderAllocator() != class_loader_allocator) {
890 // The library will be associated with class_loader. The JNI
891 // spec says we can't load the same library into more than one
920 std::string old_class_loader = call_to_string(library->GetClassLoader());
922 StringAppendF(error_msg, "Shared library \"%s\" already opened by "
925 library->GetClassLoader(),
932 VLOG(jni) << "[Shared library \"" << path << "\" already loaded in "
934 if (!library->CheckOnLoadResult()) {
942 // Open the shared library. Because we're using a full path, the system
944 // resolve this library's dependencies though.)
946 // Failures here are expected when java.library.path has several entries
953 // Retrieve the library path from the classloader, if necessary.
994 library = libraries_->Get(path);
995 if (library == nullptr) { // We won race to get libraries_lock.
996 library = new_library.release();
997 libraries_->Put(path, library);
1002 LOG(INFO) << "WOW: we lost a race to add shared library: "
1004 return library->CheckOnLoadResult();
1006 VLOG(jni) << "[Added shared library \"" << path << "\" for ClassLoader " << class_loader << "]";
1009 void* sym = library->FindSymbol("JNI_OnLoad", nullptr);
1051 library->SetResult(was_successful);