summaryrefslogtreecommitdiffstats
path: root/runtime/thread_list.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-02-13 18:02:13 -0800
committerMathieu Chartier <mathieuc@google.com>2014-02-18 10:45:12 -0800
commit815873ecc312b1d231acce71e1a16f42cdaf09f2 (patch)
tree18ba2fa951775e60b240271bfe975e6e2cfc654c /runtime/thread_list.cc
parent2befd09cf4fe89a18a655f3e1dd310831bfa769f (diff)
downloadart-815873ecc312b1d231acce71e1a16f42cdaf09f2.zip
art-815873ecc312b1d231acce71e1a16f42cdaf09f2.tar.gz
art-815873ecc312b1d231acce71e1a16f42cdaf09f2.tar.bz2
Change root visitor to use Object**.
Simplifies code and improves the performance of root visiting since we usually don't need to check to see if the object moved. Change-Id: Iba998f5a15ae1fa1b53ca5226dd2168a411196cf
Diffstat (limited to 'runtime/thread_list.cc')
-rw-r--r--runtime/thread_list.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc
index 25f692d..f058dee 100644
--- a/runtime/thread_list.cc
+++ b/runtime/thread_list.cc
@@ -771,11 +771,10 @@ class VerifyRootWrapperArg {
void* const arg_;
};
-static mirror::Object* VerifyRootWrapperCallback(mirror::Object* root, void* arg,
- uint32_t /*thread_id*/, RootType /*root_type*/) {
+static void VerifyRootWrapperCallback(mirror::Object** root, void* arg, uint32_t /*thread_id*/,
+ RootType /*root_type*/) {
VerifyRootWrapperArg* wrapperArg = reinterpret_cast<VerifyRootWrapperArg*>(arg);
- wrapperArg->callback_(root, wrapperArg->arg_, 0, NULL);
- return root;
+ wrapperArg->callback_(*root, wrapperArg->arg_, 0, NULL);
}
void ThreadList::VerifyRoots(VerifyRootCallback* callback, void* arg) const {