summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2013-09-19 10:01:59 -0700
committerMathieu Chartier <mathieuc@google.com>2013-09-20 10:36:49 -0700
commitc11d9b8870de5f860b13c84003ade7b3f3125a52 (patch)
tree89b0250d35a950774f98fa1abfa9cc296c9d85db /runtime/runtime.cc
parent261d3cda32b28782d894be0244e617f78182ee3b (diff)
downloadart-c11d9b8870de5f860b13c84003ade7b3f3125a52.zip
art-c11d9b8870de5f860b13c84003ade7b3f3125a52.tar.gz
art-c11d9b8870de5f860b13c84003ade7b3f3125a52.tar.bz2
Re-enable concurrent system weak sweeping.
Enabled by disallowing new system weaks during the pause and re-allowing it after the system weaks have been swept. Reduces GC pause by ~1ms. Fixes pause regression caused by fix for Bug: 10626133 Change-Id: If49d33e7ef19cb728ed3cef5187acfa53b9b05d8
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r--runtime/runtime.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index f7b5f74..657735a 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1237,6 +1237,18 @@ mirror::ArtMethod* Runtime::CreateCalleeSaveMethod(InstructionSet instruction_se
return method.get();
}
+void Runtime::DisallowNewSystemWeaks() {
+ monitor_list_->DisallowNewMonitors();
+ intern_table_->DisallowNewInterns();
+ java_vm_->DisallowNewWeakGlobals();
+}
+
+void Runtime::AllowNewSystemWeaks() {
+ monitor_list_->AllowNewMonitors();
+ intern_table_->AllowNewInterns();
+ java_vm_->AllowNewWeakGlobals();
+}
+
void Runtime::SetCalleeSaveMethod(mirror::ArtMethod* method, CalleeSaveType type) {
DCHECK_LT(static_cast<int>(type), static_cast<int>(kLastCalleeSaveType));
callee_save_methods_[type] = method;