1 #ifndef ANDROID_PDX_TRACE_H_
2 #define ANDROID_PDX_TRACE_H_
4 // Tracing utilities for libpdx. Tracing in the service framework is enabled
5 // under these conditions:
6 // 1. ATRACE_TAG is defined, AND
7 // 2. ATRACE_TAG does not equal ATRACE_TAG_NEVER, AND
8 // 3. PDX_TRACE_ENABLED is defined, AND
9 // 4. PDX_TRACE_ENABLED is equal to logical true.
11 // If any of these conditions are not met tracing is completely removed from the
12 // library and headers.
14 // If ATRACE_TAG is not defined, default to never.
16 #define ATRACE_TAG ATRACE_TAG_NEVER
19 // Include tracing functions after the trace tag is defined.
20 #include <utils/Trace.h>
22 // If PDX_TRACE_ENABLED is not defined, default to off.
23 #ifndef PDX_TRACE_ENABLED
24 #define PDX_TRACE_ENABLED 0
27 #if (ATRACE_TAG) != (ATRACE_TAG_NEVER) && (PDX_TRACE_ENABLED)
28 #define PDX_TRACE_NAME ATRACE_NAME
30 #define PDX_TRACE_NAME(name) \
35 #endif // ANDROID_PDX_TRACE_H_