Add more systracing everywhere
Added to:
JIT
DexFile functions
Oat file manager
Added helper ScopedTrace to prevent errors and reduce excess code.
Bug: 27502458
(cherry picked from commit dabdc0fe183d4684f3cf4d70cb09d318cff81b42)
Change-Id: Ifaeff8913d79eefc797380987d13cc00456266f8
diff --git a/runtime/trace.cc b/runtime/trace.cc
index 6b82641..b879355 100644
--- a/runtime/trace.cc
+++ b/runtime/trace.cc
@@ -19,12 +19,10 @@
#include <sys/uio.h>
#include <unistd.h>
-#define ATRACE_TAG ATRACE_TAG_DALVIK
-#include "cutils/trace.h"
-
#include "art_method-inl.h"
#include "base/casts.h"
#include "base/stl_util.h"
+#include "base/systrace.h"
#include "base/time_utils.h"
#include "base/unix_file/fd_file.h"
#include "class_linker.h"
@@ -286,7 +284,7 @@
while (true) {
usleep(interval_us);
- ATRACE_BEGIN("Profile sampling");
+ ScopedTrace trace("Profile sampling");
Thread* self = Thread::Current();
Trace* the_trace;
{
@@ -301,7 +299,6 @@
MutexLock mu(self, *Locks::thread_list_lock_);
runtime->GetThreadList()->ForEach(GetSample, the_trace);
}
- ATRACE_END();
}
runtime->DetachCurrentThread();