18 #define LOG_TAG "Trace"
22 #include <android/log.h>
30 volatile int32_t Tracer::sIsReady = 0;
31 int Tracer::sTraceFD = -1;
34 void Tracer::changeCallback() {
35 if (sIsReady && sTraceFD >= 0) {
43 const char*
const traceFileName =
44 "/sys/kernel/debug/tracing/trace_marker";
45 sTraceFD = open(traceFileName, O_WRONLY);
47 __android_log_print(ANDROID_LOG_INFO,
48 "TRACE",
"error opening trace file: %s (%d)",
49 strerror(errno), errno);
58 void Tracer::loadSystemProperty() {
#define ION_ATRACE_TAG_NOT_READY
#define ION_ATRACE_TAG_VALID_MASK
init
#define ION_ATRACE_TAG_ALWAYS
enabled.