Add systrace support to NewTimingLogger, migrate compiler timing logging to NewTimingLogger
Rpleaced old TimingLogger by NewTimingLogger, renamed NewTimingLogger to TimingLogger, added systrace support to TimingLogger.
Tests passing, phone booting, systrace working.
Change-Id: I2aeffb8bcb7f0fd979d8a2a3a8bcfbaa02413679
diff --git a/runtime/gc/collector/garbage_collector.h b/runtime/gc/collector/garbage_collector.h
index 1684664..0f566c9 100644
--- a/runtime/gc/collector/garbage_collector.h
+++ b/runtime/gc/collector/garbage_collector.h
@@ -64,7 +64,7 @@
void RegisterPause(uint64_t nano_length);
- base::NewTimingLogger& GetTimings() {
+ base::TimingLogger& GetTimings() {
return timings_;
}
@@ -101,7 +101,7 @@
const bool verbose_;
uint64_t duration_ns_;
- base::NewTimingLogger timings_;
+ base::TimingLogger timings_;
// Cumulative statistics.
uint64_t total_time_ns_;
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc
index c8e6032..0cbd6fb 100644
--- a/runtime/gc/collector/mark_sweep.cc
+++ b/runtime/gc/collector/mark_sweep.cc
@@ -1509,7 +1509,7 @@
// Update the cumulative loggers.
cumulative_timings_.Start();
- cumulative_timings_.AddNewLogger(timings_);
+ cumulative_timings_.AddLogger(timings_);
cumulative_timings_.End();
// Clear all of the spaces' mark bitmaps.
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 1c18188..b0ba8b6 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -1131,7 +1131,7 @@
<< PrettySize(total_memory) << ", " << "paused " << pause_string.str()
<< " total " << PrettyDuration((duration / 1000) * 1000);
if (VLOG_IS_ON(heap)) {
- LOG(INFO) << Dumpable<base::NewTimingLogger>(collector->GetTimings());
+ LOG(INFO) << Dumpable<base::TimingLogger>(collector->GetTimings());
}
}
@@ -1149,7 +1149,7 @@
return gc_type;
}
-void Heap::UpdateAndMarkModUnion(collector::MarkSweep* mark_sweep, base::NewTimingLogger& timings,
+void Heap::UpdateAndMarkModUnion(collector::MarkSweep* mark_sweep, base::TimingLogger& timings,
collector::GcType gc_type) {
if (gc_type == collector::kGcTypeSticky) {
// Don't need to do anything for mod union table in this case since we are only scanning dirty
@@ -1441,7 +1441,7 @@
}
}
-void Heap::ProcessCards(base::NewTimingLogger& timings) {
+void Heap::ProcessCards(base::TimingLogger& timings) {
// Clear cards and keep track of cards cleared in the mod-union table.
typedef std::vector<space::ContinuousSpace*>::iterator It;
for (It it = continuous_spaces_.begin(), end = continuous_spaces_.end(); it != end; ++it) {
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index b7b2e84..b71c2bc 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -379,7 +379,7 @@
EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);
// Update and mark mod union table based on gc type.
- void UpdateAndMarkModUnion(collector::MarkSweep* mark_sweep, base::NewTimingLogger& timings,
+ void UpdateAndMarkModUnion(collector::MarkSweep* mark_sweep, base::TimingLogger& timings,
collector::GcType gc_type)
EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);
@@ -472,7 +472,7 @@
void SwapStacks();
// Clear cards and update the mod union table.
- void ProcessCards(base::NewTimingLogger& timings);
+ void ProcessCards(base::TimingLogger& timings);
// All-known continuous spaces, where objects lie within fixed bounds.
std::vector<space::ContinuousSpace*> continuous_spaces_;