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/jit/offline_profiling_info.cc b/runtime/jit/offline_profiling_info.cc
index 67c9b5f..ecf34f5 100644
--- a/runtime/jit/offline_profiling_info.cc
+++ b/runtime/jit/offline_profiling_info.cc
@@ -26,6 +26,7 @@
#include "base/mutex.h"
#include "base/scoped_flock.h"
#include "base/stl_util.h"
+#include "base/systrace.h"
#include "base/unix_file/fd_file.h"
#include "jit/profiling_info.h"
#include "os.h"
@@ -57,6 +58,7 @@
return true;
}
+ ScopedTrace trace(__PRETTY_FUNCTION__);
ScopedFlock flock;
std::string error;
if (!flock.Init(filename.c_str(), O_RDWR | O_NOFOLLOW | O_CLOEXEC, /* block */ false, &error)) {
@@ -132,6 +134,7 @@
* app.apk:classes5.dex,218490184,39,13,49,1
**/
bool ProfileCompilationInfo::Save(int fd) {
+ ScopedTrace trace(__PRETTY_FUNCTION__);
DCHECK_GE(fd, 0);
// TODO(calin): Profile this and see how much memory it takes. If too much,
// write to file directly.
@@ -298,6 +301,7 @@
}
bool ProfileCompilationInfo::Load(int fd) {
+ ScopedTrace trace(__PRETTY_FUNCTION__);
DCHECK_GE(fd, 0);
std::string current_line;