summaryrefslogtreecommitdiffstats
path: root/include/cutils
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2013-05-08 15:03:54 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-08 15:03:54 -0700
commita0e780edd3dc10cb4110689642e2380b72906712 (patch)
tree6847bd8ef62205a3ffde9d09cd822c3b2e1a7c67 /include/cutils
parent1a8bb3e815629d603886b8f7f6842bd69b559a8f (diff)
parent6e46a3b8e64a7a2ca4754ed7b1f9922719bd0a9b (diff)
downloadsystem_core-a0e780edd3dc10cb4110689642e2380b72906712.zip
system_core-a0e780edd3dc10cb4110689642e2380b72906712.tar.gz
system_core-a0e780edd3dc10cb4110689642e2380b72906712.tar.bz2
am 6e46a3b8: am a1ee12ca: Merge "libcutils: add a trace tag for Dalvik" into jb-mr2-dev
* commit '6e46a3b8e64a7a2ca4754ed7b1f9922719bd0a9b': libcutils: add a trace tag for Dalvik
Diffstat (limited to 'include/cutils')
-rw-r--r--include/cutils/trace.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/cutils/trace.h b/include/cutils/trace.h
index 9b564e2..29034ca 100644
--- a/include/cutils/trace.h
+++ b/include/cutils/trace.h
@@ -65,7 +65,8 @@ __BEGIN_DECLS
#define ATRACE_TAG_HAL (1<<11)
#define ATRACE_TAG_APP (1<<12)
#define ATRACE_TAG_RESOURCES (1<<13)
-#define ATRACE_TAG_LAST ATRACE_TAG_RESOURCES
+#define ATRACE_TAG_DALVIK (1<<14)
+#define ATRACE_TAG_LAST ATRACE_TAG_DALVIK
// Reserved for initialization.
#define ATRACE_TAG_NOT_READY (1LL<<63)
@@ -78,6 +79,7 @@ __BEGIN_DECLS
#error ATRACE_TAG must be defined to be one of the tags defined in cutils/trace.h
#endif
+#ifdef HAVE_ANDROID_OS
/**
* Maximum size of a message that can be logged to the trace buffer.
* Note this message includes a tag, the pid, and the string given as the name.
@@ -256,6 +258,19 @@ static inline void atrace_int(uint64_t tag, const char* name, int32_t value)
}
}
+#else // not HAVE_ANDROID_OS
+
+#define ATRACE_INIT()
+#define ATRACE_GET_ENABLED_TAGS()
+#define ATRACE_ENABLED()
+#define ATRACE_BEGIN(name)
+#define ATRACE_END()
+#define ATRACE_ASYNC_BEGIN(name, cookie)
+#define ATRACE_ASYNC_END(name, cookie)
+#define ATRACE_INT(name, value)
+
+#endif // not HAVE_ANDROID_OS
+
__END_DECLS
#endif // _LIBS_CUTILS_TRACE_H