Revert "Revert "ART: introduce PALette abstraction layer""
This reverts commit e6e01a0a00de80704ccb21c48d5d8bdee4470b77.
Bug: 122824298
Test: art/test/testrunner/run_build_test_target.py -j50 art-test-javac
Test: m out/target/common/obj/PACKAGING/hiddenapi-stub-flags.txt
Test: frameworks/rs/build_rs.py
Change-Id: If7b9ddca3daa80b75b3541abd283bf47d5b81118
diff --git a/runtime/monitor.cc b/runtime/monitor.cc
index 7240357..6abc8d7 100644
--- a/runtime/monitor.cc
+++ b/runtime/monitor.cc
@@ -280,7 +280,7 @@
// This function is inlined and just helps to not have the VLOG and ATRACE check at all the
// potential tracing points.
void Monitor::AtraceMonitorLock(Thread* self, mirror::Object* obj, bool is_wait) {
- if (UNLIKELY(VLOG_IS_ON(systrace_lock_logging) && ATRACE_ENABLED())) {
+ if (UNLIKELY(VLOG_IS_ON(systrace_lock_logging) && ATraceEnabled())) {
AtraceMonitorLockImpl(self, obj, is_wait);
}
}
@@ -338,12 +338,12 @@
(obj == nullptr ? -1 : static_cast<int32_t>(reinterpret_cast<uintptr_t>(obj))),
(filename != nullptr ? filename : "null"),
line_number);
- ATRACE_BEGIN(tmp.c_str());
+ ATraceBegin(tmp.c_str());
}
void Monitor::AtraceMonitorUnlock() {
if (UNLIKELY(VLOG_IS_ON(systrace_lock_logging))) {
- ATRACE_END();
+ ATraceEnd();
}
}
@@ -431,7 +431,7 @@
// If systrace logging is enabled, first look at the lock owner. Acquiring the monitor's
// lock and then re-acquiring the mutator lock can deadlock.
bool started_trace = false;
- if (ATRACE_ENABLED()) {
+ if (ATraceEnabled()) {
if (owner_ != nullptr) { // Did the owner_ give the lock up?
std::ostringstream oss;
std::string name;
@@ -450,7 +450,7 @@
oss << " blocking from "
<< ArtMethod::PrettyMethod(m) << "(" << (filename != nullptr ? filename : "null")
<< ":" << line_number << ")";
- ATRACE_BEGIN(oss.str().c_str());
+ ATraceBegin(oss.str().c_str());
started_trace = true;
}
}
@@ -581,7 +581,7 @@
}
}
if (started_trace) {
- ATRACE_END();
+ ATraceEnd();
}
self->SetMonitorEnterObject(nullptr);
monitor_lock_.Lock(self); // Reacquire locks in order.