summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gc/mark_sweep.cc6
-rw-r--r--src/verifier/method_verifier.h7
2 files changed, 7 insertions, 6 deletions
diff --git a/src/gc/mark_sweep.cc b/src/gc/mark_sweep.cc
index 86373702bf..0869e26a01 100644
--- a/src/gc/mark_sweep.cc
+++ b/src/gc/mark_sweep.cc
@@ -37,6 +37,7 @@
#include "timing_logger.h"
#include "thread.h"
#include "thread_list.h"
+#include "verifier/method_verifier.h"
namespace art {
@@ -185,9 +186,10 @@ void MarkSweep::VerifyRoot(const Object* root, size_t vreg, const AbstractMethod
LargeObjectSpace* large_object_space = GetHeap()->GetLargeObjectsSpace();
if (!large_object_space->Contains(root)) {
LOG(ERROR) << "Found invalid root: " << root;
- LOG(ERROR) << "VReg / Shadow frame offset: " << vreg;
+ LOG(ERROR) << "VReg: " << vreg;
if (method != NULL) {
- LOG(ERROR) << "In method " << PrettyMethod(method, true);
+ LOG(ERROR) << "In method " << PrettyMethod(method, true) << "\nVerifier output:\n";
+ verifier::MethodVerifier::VerifyMethodAndDump(const_cast<AbstractMethod*>(method));
}
}
}
diff --git a/src/verifier/method_verifier.h b/src/verifier/method_verifier.h
index 8951b137d9..6765c1015b 100644
--- a/src/verifier/method_verifier.h
+++ b/src/verifier/method_verifier.h
@@ -162,6 +162,9 @@ class MethodVerifier {
std::string& error)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ static void VerifyMethodAndDump(AbstractMethod* method)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
uint8_t EncodePcToReferenceMapData() const;
uint32_t DexFileVersion() const {
@@ -235,8 +238,6 @@ class MethodVerifier {
ClassLoader* class_loader, uint32_t class_def_idx, const DexFile::CodeItem* code_item,
AbstractMethod* method, uint32_t method_access_flags)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- static void VerifyMethodAndDump(AbstractMethod* method)
- SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
// Run verification on the method. Returns true if verification completes and false if the input
// has an irrecoverable corruption.
@@ -653,8 +654,6 @@ class MethodVerifier {
// The number of occurrences of specific opcodes.
size_t new_instance_count_;
size_t monitor_enter_count_;
-
- friend struct art::ReferenceMap2Visitor; // for VerifyMethodAndDump
};
std::ostream& operator<<(std::ostream& os, const MethodVerifier::FailureKind& rhs);