diff options
Diffstat (limited to 'runtime/gc/verification.h')
-rw-r--r-- | runtime/gc/verification.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/gc/verification.h b/runtime/gc/verification.h index 903e159c5a..6b456fd349 100644 --- a/runtime/gc/verification.h +++ b/runtime/gc/verification.h @@ -49,11 +49,10 @@ class Verification { mirror::Object* ref, bool fatal) const REQUIRES_SHARED(Locks::mutator_lock_); - // Return true if the klass is likely to be a valid mirror::Class. bool IsValidClass(const void* klass) const REQUIRES_SHARED(Locks::mutator_lock_); - // Does not allow null. + // Does not allow null, checks alignment. bool IsValidHeapObjectAddress(const void* addr, space::Space** out_space = nullptr) const REQUIRES_SHARED(Locks::mutator_lock_); @@ -62,6 +61,14 @@ class Verification { std::string FirstPathFromRootSet(ObjPtr<mirror::Object> target) const REQUIRES_SHARED(Locks::mutator_lock_); + // Does not check alignment, used by DumpRAMAroundAddress. + bool IsAddressInHeapSpace(const void* addr, space::Space** out_space = nullptr) const + REQUIRES_SHARED(Locks::mutator_lock_); + + // Dump bytes of RAM before and after an address. + std::string DumpRAMAroundAddress(uintptr_t addr, uintptr_t bytes) const + REQUIRES_SHARED(Locks::mutator_lock_); + private: gc::Heap* const heap_; |