ART: Dump less maps
Security has been tightened, so there are situations where we can't
load our files, and produce "log spam."
Bug: 27925454
(cherry picked from commit dfd7b70bbab8157fb385e4a6d6e4b55ae2e4e892)
Change-Id: Ia8c76184ea5087d625cf52d4459f8a557eebfafe
diff --git a/runtime/oat_file.cc b/runtime/oat_file.cc
index 7c83715..c60962b 100644
--- a/runtime/oat_file.cc
+++ b/runtime/oat_file.cc
@@ -173,7 +173,7 @@
}
if (requested_base != nullptr && begin_ != requested_base) {
// Host can fail this check. Do not dump there to avoid polluting the output.
- if (kIsTargetBuild) {
+ if (kIsTargetBuild && (kIsDebugBuild || VLOG_IS_ON(oat))) {
PrintFileToLog("/proc/self/maps", LogSeverity::WARNING);
}
*error_msg = StringPrintf("Failed to find oatdata symbol at expected address: "