Merge "Support apps that pass JNI_VERSION_1_1 to GetEnv." into klp-dev
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index f824dd7..4fd9a60 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -353,41 +353,27 @@
 
 void DexFile::InitIndex() {
   CHECK_EQ(index_.size(), 0U) << GetLocation();
-bool debug_file = (GetLocation() == "/data/app/com.eclipsim.gpsstatus2-1.apk");
   for (size_t i = 0; i < NumClassDefs(); ++i) {
     const ClassDef& class_def = GetClassDef(i);
     const char* descriptor = GetClassDescriptor(class_def);
-bool debug_log = (strcmp(descriptor, "Lo/coN;") == 0);
-if (debug_log) { LG << this << " XXX bdc DexFile::InitIndex " << GetLocation() << " i=" << i << " descriptor=" << descriptor << " strlen(descriptor)=" << strlen(descriptor); }
     index_.Put(descriptor, i);
   }
-if (debug_file) { LG << this << " XXX bdc DexFile::InitIndex " << GetLocation() << " index_.size()=" << index_.size(); }
 }
 
 bool DexFile::FindClassDefIndex(const StringPiece& descriptor, uint32_t& idx) const {
-bool debug_file = (GetLocation() == "/data/app/com.eclipsim.gpsstatus2-1.apk");
-bool debug_log = (descriptor == "Lo/coN;");
   Index::const_iterator it = index_.find(descriptor);
   if (it == index_.end()) {
-if (debug_log) { LG << this << " XXX bdc DexFile::FindClassDefIndex(" << descriptor << ") => false debug_log=" << debug_log << " descriptor.size()=" << descriptor.size() << " " << strlen("Lo/coN;"); }
-if (debug_file) { LG << this << " XXX bdc DexFile::FindClassDefIndex " << GetLocation() << " index_.size()=" << index_.size(); }
     return false;
   }
   idx = it->second;
-if (debug_log) { LG << this << " XXX bdc DexFile::FindClassDefIndex(" << descriptor << ") => true idx=" << idx; }
   return true;
 }
 
 const DexFile::ClassDef* DexFile::FindClassDef(const StringPiece& descriptor) const {
   uint32_t idx;
-bool debug_file = (GetLocation() == "/data/app/com.eclipsim.gpsstatus2-1.apk");
-bool debug_log = (descriptor == "Lo/coN;");
   if (FindClassDefIndex(descriptor, idx)) {
-if (debug_log) { LG << this << " XXX bdc DexFile::FindClassDef(" << descriptor << ") => success"; }
     return &GetClassDef(idx);
   }
-if (debug_log) { LG << this << " XXX bdc DexFile::FindClassDef(" << descriptor << ") => NULL debug_log=" << debug_log << " descriptor.size()=" << descriptor.size() << " " << strlen("Lo/coN;"); }
-if (debug_file) { LG << this << " XXX bdc DexFile::FindClassDef " << GetLocation() << " index_.size()=" << index_.size(); }
   return NULL;
 }
 
diff --git a/runtime/entrypoints/quick/quick_throw_entrypoints.cc b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
index 2b060f8..f67b2fc 100644
--- a/runtime/entrypoints/quick/quick_throw_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
@@ -58,7 +58,6 @@
     SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
   FinishCalleeSaveFrameSetup(self, sp, Runtime::kSaveAll);
   ThrowLocation throw_location = self->GetCurrentLocationForThrow();
-  LG << "artThrowNullPointerExceptionFromCode GetDexPc=0x" << std::hex << throw_location.GetDexPc();
   ThrowNullPointerExceptionFromDexPC(throw_location);
   self->QuickDeliverException();
 }
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index a5eaad6..2f4e427 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -142,20 +142,17 @@
   const DexFile* dex_file = toDexFile(cookie);
   if (dex_file == NULL) {
     VLOG(class_linker) << "Failed to find dex_file";
-    LG << "XXX bdc Failed to find dex_file";
     return NULL;
   }
   ScopedUtfChars class_name(env, javaName);
   if (class_name.c_str() == NULL) {
-    VLOG(class_linker) << "Failed to find class_name to lookup in " << dex_file->GetLocation();
-    LG << "XXX bdc Failed to find class_name to lookup in " << dex_file->GetLocation();
+    VLOG(class_linker) << "Failed to find class_name";
     return NULL;
   }
   const std::string descriptor(DotToDescriptor(class_name.c_str()));
   const DexFile::ClassDef* dex_class_def = dex_file->FindClassDef(descriptor);
   if (dex_class_def == NULL) {
-    VLOG(class_linker) << "Failed to find dex_class_def " << descriptor << " in " << dex_file->GetLocation();
-    LG << dex_file << " XXX bdc Failed to find dex_class_def " << descriptor << " in " << dex_file->GetLocation();
+    VLOG(class_linker) << "Failed to find dex_class_def";
     return NULL;
   }
   ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
@@ -163,8 +160,7 @@
   mirror::ClassLoader* class_loader = soa.Decode<mirror::ClassLoader*>(javaLoader);
   mirror::Class* result = class_linker->DefineClass(descriptor.c_str(), class_loader, *dex_file,
                                                     *dex_class_def);
-  VLOG(class_linker) << "DexFile_defineClassNative for " << " in " << dex_file->GetLocation() << descriptor << " returning " << result;
-  LG << dex_file << " XXX bdc DexFile_defineClassNative for " << descriptor << " in " << dex_file->GetLocation() << " returning " << result;
+  VLOG(class_linker) << "DexFile_defineClassNative returning " << result;
   return soa.AddLocalReference<jclass>(result);
 }
 
diff --git a/runtime/reflection.cc b/runtime/reflection.cc
index 5e44a4c..3e58b4b 100644
--- a/runtime/reflection.cc
+++ b/runtime/reflection.cc
@@ -38,13 +38,6 @@
   jmethodID mid = soa.Env()->FromReflectedMethod(javaMethod);
   mirror::ArtMethod* m = soa.DecodeMethod(mid);
 
-  std::string pretty_descriptor(PrettyDescriptor(m->GetDeclaringClass()));
-  if (true ||
-      StartsWith(pretty_descriptor, "Lcom/eclipsim/gpsstatus2/") ||
-      StartsWith(pretty_descriptor, "Lo/")) {
-    LG << "XXX bdc InvokeMethod reflectively calling " << PrettyMethod(m);
-  }
-
   mirror::Class* declaring_class = m->GetDeclaringClass();
   if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(declaring_class, true, true)) {
     return NULL;
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 26b9c31..a454195 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -819,8 +819,7 @@
         mh.ChangeMethod(m);
         const char* source_file(mh.GetDeclaringClassSourceFile());
         os << "(" << (source_file != NULL ? source_file : "unavailable")
-           << ":" << line_number << ")"
-           << " <0x" << std::hex << GetDexPc() << ">";
+           << ":" << line_number << ")";
       }
       os << "\n";
       if (frame_count == 0) {
@@ -1922,7 +1921,6 @@
   ThrowLocation throw_location;
   mirror::Throwable* exception = GetException(&throw_location);
   CHECK(exception != NULL);
-  LG << "XXX bdc QuickDeliverException " << PrettyMethod(throw_location.GetMethod()) << " " << std::hex << throw_location.GetDexPc();
   // Don't leave exception visible while we try to find the handler, which may cause class
   // resolution.
   ClearException();