diff options
| author | 2016-08-26 10:39:29 -0700 | |
|---|---|---|
| committer | 2016-08-26 12:01:01 -0700 | |
| commit | 6fb276b5e6ac92a25edde51a6f5f4c70eb3e2cf8 (patch) | |
| tree | c29e5dd111402c2682ca918e9a30e9566c038c6c | |
| parent | cc55a7ce2aa0f10c2da9efaa89855cf075e56e20 (diff) | |
Fix a race condition on GC timing logger data.
The GC timing logger data is thread local to the GC thread and
shouldn't be used by a mutator. The original intention was to have a
systrace scope.
This should fix the 004-JniTest failures.
Bug: 30980189
Bug: 29517059
Bug: 12687968
Test: test-art-host
Change-Id: Ibc8cfbfdd64d85ff65bf220d3022fc8fdf1064f2
| -rw-r--r-- | runtime/gc/heap.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 9e454ca100..4d16b6e114 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -880,12 +880,12 @@ void Heap::IncrementDisableThreadFlip(Thread* self) { bool has_waited = false; uint64_t wait_start = NanoTime(); if (thread_flip_running_) { - TimingLogger::ScopedTiming split("IncrementDisableThreadFlip", - GetCurrentGcIteration()->GetTimings()); + ATRACE_BEGIN("IncrementDisableThreadFlip"); while (thread_flip_running_) { has_waited = true; thread_flip_cond_->Wait(self); } + ATRACE_END(); } ++disable_thread_flip_count_; if (has_waited) { |