Improve heap verification for invalid roots.
The new root verification prints the root type and owner thread id as
well as the type of the object.
Also a bit of work for planned multi-threaded verification.
Bug: 14289301
Change-Id: Ia73c517dc11ec6dd82f3d945604ee3836b3db536
diff --git a/runtime/object_callbacks.h b/runtime/object_callbacks.h
index 767c197..dd8ce16 100644
--- a/runtime/object_callbacks.h
+++ b/runtime/object_callbacks.h
@@ -17,6 +17,8 @@
#ifndef ART_RUNTIME_OBJECT_CALLBACKS_H_
#define ART_RUNTIME_OBJECT_CALLBACKS_H_
+// For ostream.
+#include <ostream>
// For uint32_t.
#include <stdint.h>
// For size_t.
@@ -46,6 +48,7 @@
kRootVMInternal,
kRootJNIMonitor,
};
+std::ostream& operator<<(std::ostream& os, const RootType& root_type);
// Returns the new address of the object, returns root if it has not moved. tid and root_type are
// only used by hprof.