From f0f57884062c11fc633f413608905532780e4291 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 28 Mar 2019 19:04:48 -0700 Subject: [PATCH] Make ion trace point optional Bug: 129485781 Test: Build Change-Id: I90fc0868df85887e542372cd55dc76be14c9d420 --- atrace/1.0/default/AtraceDevice.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/atrace/1.0/default/AtraceDevice.cpp b/atrace/1.0/default/AtraceDevice.cpp index 43bcd9a29c..35d11e9972 100644 --- a/atrace/1.0/default/AtraceDevice.cpp +++ b/atrace/1.0/default/AtraceDevice.cpp @@ -30,24 +30,25 @@ using ::android::hardware::atrace::V1_0::TracingCategory; struct TracingConfig { std::string description; + // path and if error on failure std::vector> paths; }; // This is a map stores categories and their sysfs paths with required flags const std::map kTracingMap = { - // gfx - { - "gfx", - {"Graphics", - {{"/sys/kernel/debug/tracing/events/mdss/enable", false}, - {"/sys/kernel/debug/tracing/events/sde/enable", false}, - {"/sys/kernel/debug/tracing/events/mali_systrace/enable", false}}}, - }, - { - "ion", - {"ION allocation", - {{"/sys/kernel/debug/tracing/events/kmem/ion_alloc_buffer_start/enable", true}}}, - }, + // gfx + { + "gfx", + {"Graphics", + {{"/sys/kernel/debug/tracing/events/mdss/enable", false}, + {"/sys/kernel/debug/tracing/events/sde/enable", false}, + {"/sys/kernel/debug/tracing/events/mali_systrace/enable", false}}}, + }, + { + "ion", + {"ION allocation", + {{"/sys/kernel/debug/tracing/events/kmem/ion_alloc_buffer_start/enable", false}}}, + }, }; // Methods from ::android::hardware::atrace::V1_0::IAtraceDevice follow.