Fix memory leaks relating to timing logger.
Bug: 11670287.
We use pointers to uninitialized values for control-flow in the timing logger
code, add TODO comments to clean this up later.
Remove base namespace and other bits of tidying.
Change-Id: I1e6600a1e92f974c8f58f3a405a4e4abb4d9f80f
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 3781921..fada66a 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -242,7 +242,7 @@
bool image,
UniquePtr<CompilerDriver::DescriptorSet>& image_classes,
bool dump_stats,
- base::TimingLogger& timings) {
+ TimingLogger& timings) {
// SirtRef and ClassLoader creation needs to come after Runtime::Create
jobject class_loader = NULL;
Thread* self = Thread::Current();
@@ -600,7 +600,7 @@
}
static int dex2oat(int argc, char** argv) {
- base::TimingLogger timings("compiler", false, false);
+ TimingLogger timings("compiler", false, false);
InitLogging(argv);
@@ -1091,7 +1091,7 @@
if (is_host) {
if (dump_timing || (dump_slow_timing && timings.GetTotalNs() > MsToNs(1000))) {
- LOG(INFO) << Dumpable<base::TimingLogger>(timings);
+ LOG(INFO) << Dumpable<TimingLogger>(timings);
}
return EXIT_SUCCESS;
}
@@ -1133,7 +1133,7 @@
timings.EndSplit();
if (dump_timing || (dump_slow_timing && timings.GetTotalNs() > MsToNs(1000))) {
- LOG(INFO) << Dumpable<base::TimingLogger>(timings);
+ LOG(INFO) << Dumpable<TimingLogger>(timings);
}
// Everything was successfully written, do an explicit exit here to avoid running Runtime