summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liu <liumartin@google.com>2022-11-18 04:17:20 +0000
committerMartin Liu <liumartin@google.com>2022-11-18 04:17:20 +0000
commitdf400398f0e0f43b8bc050f245678da5edbdd1a3 (patch)
tree1840b1592f2aee1eedc9920fa0feca0c389eb2ba
parent4c8bb5fcf30b024c2db6275eac9179ca79b5db9f (diff)
Add CMA buffer alloc/info trace to memory category
Bug: 258188795 Test: capture trace from traceur and able to see CMA traces Change-Id: I0f8ce176f0d14d94dc69571d5bbd5174733c253e Signed-off-by: Martin Liu <liumartin@google.com>
-rw-r--r--atrace/AtraceDevice.cpp6
-rw-r--r--atrace/android.hardware.atrace@1.0-service.pixel.rc3
2 files changed, 8 insertions, 1 deletions
diff --git a/atrace/AtraceDevice.cpp b/atrace/AtraceDevice.cpp
index 5f8b9cd..bbe7230 100644
--- a/atrace/AtraceDevice.cpp
+++ b/atrace/AtraceDevice.cpp
@@ -48,7 +48,11 @@ const std::map<std::string, TracingConfig> kTracingMap = {
},
{
"memory",
- {"Memory", {{"fastrpc/fastrpc_dma_stat", false}, {"dmabuf_heap", false}}},
+ {"Memory",
+ {{"fastrpc/fastrpc_dma_stat", false},
+ {"dmabuf_heap", false},
+ {"cma/cma_alloc_start", false},
+ {"cma/cma_alloc_info", false}}},
},
{
"ion",
diff --git a/atrace/android.hardware.atrace@1.0-service.pixel.rc b/atrace/android.hardware.atrace@1.0-service.pixel.rc
index 7d2a50d..c198407 100644
--- a/atrace/android.hardware.atrace@1.0-service.pixel.rc
+++ b/atrace/android.hardware.atrace@1.0-service.pixel.rc
@@ -36,6 +36,9 @@ on late-init
chmod 0666 /sys/kernel/tracing/events/thermal_exynos/enable
chmod 0666 /sys/kernel/debug/tracing/events/thermal_exynos_gpu/enable
chmod 0666 /sys/kernel/tracing/events/thermal_exynos_gpu/enable
+ # memory trace points
+ chmod 0666 /sys/kernel/tracing/events/cma/cma_alloc_start/enable
+ chmod 0666 /sys/kernel/tracing/events/cma/cma_alloc_info/enable
service vendor.atrace-hal-1-0 /vendor/bin/hw/android.hardware.atrace@1.0-service.pixel
interface android.hardware.atrace@1.0::IAtraceDevice default