Create a wrapper for atrace macros
Create a SF specific macro to call into atrace. This will make the
switch to perfetto for capturing atrace tags easier.
Flag: EXEMPT refactor
Bug: 349905670
Test: perfetto
Change-Id: I4d046d837f52ef78b08e3c97556f2eddb06232dd
diff --git a/services/surfaceflinger/TransactionCallbackInvoker.cpp b/services/surfaceflinger/TransactionCallbackInvoker.cpp
index 37543ba..881bf35 100644
--- a/services/surfaceflinger/TransactionCallbackInvoker.cpp
+++ b/services/surfaceflinger/TransactionCallbackInvoker.cpp
@@ -26,12 +26,10 @@
#include "TransactionCallbackInvoker.h"
#include "BackgroundExecutor.h"
#include "Utils/FenceUtils.h"
-#include "utils/Trace.h"
-
-#include <cinttypes>
#include <binder/IInterface.h>
#include <common/FlagManager.h>
+#include <common/trace.h>
#include <utils/RefBase.h>
namespace android {
@@ -209,7 +207,7 @@
BackgroundExecutor::getInstance().sendCallbacks(
{[listenerStatsToSend = std::move(listenerStatsToSend)]() {
- ATRACE_NAME("TransactionCallbackInvoker::sendCallbacks");
+ SFTRACE_NAME("TransactionCallbackInvoker::sendCallbacks");
for (auto& stats : listenerStatsToSend) {
interface_cast<ITransactionCompletedListener>(stats.listener)
->onTransactionCompleted(stats);