diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-03-09 14:46:01 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-03-09 15:43:12 -0800 |
commit | 45b80c69ad8057fde0c0a76f7da3a2183a2aab96 (patch) | |
tree | a91bcd9ad672b9ffc577b978f10dd377fb56c08d /libs/utils | |
parent | 373c2b28692b5454c42ac286aaae8483d6921188 (diff) | |
download | frameworks_native-45b80c69ad8057fde0c0a76f7da3a2183a2aab96.zip frameworks_native-45b80c69ad8057fde0c0a76f7da3a2183a2aab96.tar.gz frameworks_native-45b80c69ad8057fde0c0a76f7da3a2183a2aab96.tar.bz2 |
Expose the set of enabled tags.
This is used by the Java trace wrappers to avoid JNI overhead
when trace tags are disabled.
Also added a new tag for the input subsystem and view hierarchy.
Change-Id: Ia04a507e42a37b1d3bbb19859e6c07a92f4fe9aa
Diffstat (limited to 'libs/utils')
-rw-r--r-- | libs/utils/Trace.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/utils/Trace.cpp b/libs/utils/Trace.cpp index c49278a..d532296 100644 --- a/libs/utils/Trace.cpp +++ b/libs/utils/Trace.cpp @@ -34,10 +34,12 @@ void Tracer::init() { sTraceFD = open(traceFileName, O_WRONLY); if (sTraceFD == -1) { ALOGE("error opening trace file: %s (%d)", strerror(errno), errno); + // sEnabledTags remains zero indicating that no tracing can occur } else { char value[PROPERTY_VALUE_MAX]; property_get("atrace.tags.enableflags", value, "0"); - sEnabledTags = strtoll(value, NULL, 0) | ATRACE_TAG_ALWAYS; + sEnabledTags = (strtoll(value, NULL, 0) & ATRACE_TAG_VALID_MASK) + | ATRACE_TAG_ALWAYS; } android_atomic_release_store(1, &sIsReady); |