Implement ThreadReference.OwnedMonitors.
Fix the method verifier so it can cope with not being able to resolve
types in the application class loader, so we can find monitors held in
application code (this will improve SIGQUIT too).
Also remove the sort|uniq of dex pcs by just recording the last work
line we see.
Change-Id: I86ff27b42800a858489d112931c9aed2fb85ebdc
diff --git a/src/monitor.h b/src/monitor.h
index b546289..66db42e 100644
--- a/src/monitor.h
+++ b/src/monitor.h
@@ -87,7 +87,10 @@
static void DescribeWait(std::ostream& os, const Thread* thread)
LOCKS_EXCLUDED(Locks::thread_suspend_count_lock_)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- static void DescribeLocks(std::ostream& os, StackVisitor* stack_visitor)
+
+ // Calls 'callback' once for each lock held in the single stack frame represented by
+ // the current state of 'stack_visitor'.
+ static void VisitLocks(StackVisitor* stack_visitor, void (*callback)(Object*, void*), void* callback_context)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
Object* GetObject();