summaryrefslogtreecommitdiffstats
path: root/runtime/native
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2014-09-23 13:53:28 -0700
committerBrian Carlstrom <bdc@google.com>2014-09-24 09:35:17 -0700
commite8e39895249d24c9fe6f4eb0afa78b39ce0648bb (patch)
treecfb5bd0305dddd937ba211a0a7fbdbdfe519864b /runtime/native
parentc0d36abb12cdbb9469039c1dc153a586bd984015 (diff)
downloadart-e8e39895249d24c9fe6f4eb0afa78b39ce0648bb.zip
art-e8e39895249d24c9fe6f4eb0afa78b39ce0648bb.tar.gz
art-e8e39895249d24c9fe6f4eb0afa78b39ce0648bb.tar.bz2
Restore kReasonLogging for kDexoptNeeded and kPatchoatNeeded
Bug: 17565501 (cherry picked from commit 63582f211b7123d02f18dfa7075f6758ccb2b07c) Change-Id: Ie1196191d92286e543ed099c7d1ea4712802912d
Diffstat (limited to 'runtime/native')
-rw-r--r--runtime/native/dalvik_system_DexFile.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/runtime/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
index 003815e..65a7919 100644
--- a/runtime/native/dalvik_system_DexFile.cc
+++ b/runtime/native/dalvik_system_DexFile.cc
@@ -292,7 +292,7 @@ static jbyte IsDexOptNeededForFile(const std::string& oat_filename, const char*
std::unique_ptr<const OatFile> oat_file(OatFile::Open(oat_filename, oat_filename, nullptr,
false, &error_msg));
if (oat_file.get() == nullptr) {
- if (kVerboseLogging) {
+ if (kReasonLogging) {
LOG(INFO) << "DexFile_isDexOptNeeded failed to open oat file '" << oat_filename
<< "' for file location '" << filename << "': " << error_msg;
}
@@ -319,13 +319,13 @@ static jbyte IsDexOptNeededForFile(const std::string& oat_filename, const char*
return kUpToDate;
} else if (should_relocate_if_possible &&
ClassLinker::VerifyOatImageChecksum(oat_file.get(), target_instruction_set)) {
- if (kVerboseLogging) {
+ if (kReasonLogging) {
LOG(INFO) << "DexFile_isDexOptNeeded file " << oat_filename
<< " needs to be relocated for " << filename;
}
return kPatchoatNeeded;
} else {
- if (kVerboseLogging) {
+ if (kReasonLogging) {
LOG(INFO) << "DexFile_isDexOptNeeded file " << oat_filename
<< " is out of date for " << filename;
}
@@ -343,13 +343,13 @@ static jbyte IsDexOptNeededForFile(const std::string& oat_filename, const char*
} else if (location_checksum == oat_dex_file->GetDexFileLocationChecksum()
&& should_relocate_if_possible
&& ClassLinker::VerifyOatImageChecksum(oat_file.get(), target_instruction_set)) {
- if (kVerboseLogging) {
+ if (kReasonLogging) {
LOG(INFO) << "DexFile_isDexOptNeeded file " << oat_filename
<< " needs to be relocated for " << filename;
}
return kPatchoatNeeded;
} else {
- if (kVerboseLogging) {
+ if (kReasonLogging) {
LOG(INFO) << "DexFile_isDexOptNeeded file " << oat_filename
<< " is out of date for " << filename;
}
@@ -357,7 +357,7 @@ static jbyte IsDexOptNeededForFile(const std::string& oat_filename, const char*
}
}
} else {
- if (kVerboseLogging) {
+ if (kReasonLogging) {
LOG(INFO) << "DexFile_isDexOptNeeded file " << oat_filename
<< " does not contain " << filename;
}
@@ -367,9 +367,10 @@ static jbyte IsDexOptNeededForFile(const std::string& oat_filename, const char*
static jbyte IsDexOptNeededInternal(JNIEnv* env, const char* filename,
const char* pkgname, const char* instruction_set, const jboolean defer) {
- // TODO disable this logging.
- const bool kVerboseLogging = false; // Spammy logging.
- const bool kReasonLogging = true; // Logging of reason for returning JNI_TRUE.
+ // Spammy logging for kUpToDate
+ const bool kVerboseLogging = false;
+ // Logging of reason for returning kDexoptNeeded or kPatchoatNeeded.
+ const bool kReasonLogging = true;
if ((filename == nullptr) || !OS::FileExists(filename)) {
LOG(ERROR) << "DexFile_isDexOptNeeded file '" << filename << "' does not exist";