diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-03-04 11:07:42 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-03-04 14:21:58 -0800 |
commit | 893263b7d5bc2ca43a91ecb8071867f5134fc60a (patch) | |
tree | a99238843a9caad00122c8f7d13e031f5d81bc38 /runtime/class_linker_test.cc | |
parent | 2fece5941f12395a94e742313e7059a9e419994d (diff) | |
download | art-893263b7d5bc2ca43a91ecb8071867f5134fc60a.zip art-893263b7d5bc2ca43a91ecb8071867f5134fc60a.tar.gz art-893263b7d5bc2ca43a91ecb8071867f5134fc60a.tar.bz2 |
Avoid marking old class linker and intern table roots during pause.
The new root visiting logic has a concept of a root log which holds
new roots which were added since the start of the GC. This is an
optimization since it lets us only mark these newly added roots
during the pause (or pre-cleaning) since the other roots intern table
and class linker roots were marked concurrently at the start of the
GC.
Before (EvaluateAndApplyChanges):
MarkConcurrentRoots: Sum: 605.193ms
After:
MarkConcurrentRoots: Sum: 271.858ms
This should also reduce pathological GC pauses which used to be able
to happen when the intern table or class linker became "dirty"
during the concurrent GC.
Change-Id: I433fab021f2c339d50c35aaae7161a50a0901dec
Diffstat (limited to 'runtime/class_linker_test.cc')
-rw-r--r-- | runtime/class_linker_test.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc index 55c23f4..e6aa9c2 100644 --- a/runtime/class_linker_test.cc +++ b/runtime/class_linker_test.cc @@ -334,7 +334,7 @@ class ClassLinkerTest : public CommonRuntimeTest { const char* descriptor = dex->GetTypeDescriptor(type_id); AssertDexFileClass(class_loader, descriptor); } - class_linker_->VisitRoots(TestRootVisitor, NULL, false, false); + class_linker_->VisitRoots(TestRootVisitor, NULL, kVisitRootFlagAllRoots); // Verify the dex cache has resolution methods in all resolved method slots mirror::DexCache* dex_cache = class_linker_->FindDexCache(*dex); mirror::ObjectArray<mirror::ArtMethod>* resolved_methods = dex_cache->GetResolvedMethods(); |