audio: Add tracing to audio I/O and effect processing
Emit trace events for audio reads and writes and effect
processing functions. This is to match the HIDL implementation.
Bug: 321233946
Test: `record_android_trace` with `audio` category enabled
Change-Id: I26907b09243fd3e5aaa470a0fb930b34addd3093
diff --git a/audio/aidl/default/EffectImpl.cpp b/audio/aidl/default/EffectImpl.cpp
index c29bf79..c97a03e 100644
--- a/audio/aidl/default/EffectImpl.cpp
+++ b/audio/aidl/default/EffectImpl.cpp
@@ -15,7 +15,9 @@
*/
#include <memory>
+#define ATRACE_TAG ATRACE_TAG_AUDIO
#define LOG_TAG "AHAL_EffectImpl"
+#include <utils/Trace.h>
#include "effect-impl/EffectImpl.h"
#include "effect-impl/EffectTypes.h"
#include "include/effect-impl/EffectTypes.h"
@@ -298,6 +300,7 @@
}
void EffectImpl::process() {
+ ATRACE_CALL();
/**
* wait for the EventFlag without lock, it's ok because the mEfGroup pointer will not change
* in the life cycle of workerThread (threadLoop).