summaryrefslogtreecommitdiffstats
path: root/include/cutils/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cutils/trace.h')
-rw-r--r--include/cutils/trace.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/include/cutils/trace.h b/include/cutils/trace.h
index 1c8f107..fd9bc6a 100644
--- a/include/cutils/trace.h
+++ b/include/cutils/trace.h
@@ -17,13 +17,15 @@
#ifndef _LIBS_CUTILS_TRACE_H
#define _LIBS_CUTILS_TRACE_H
+#include <inttypes.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
#include <sys/cdefs.h>
#include <sys/types.h>
-#include <stdint.h>
-#include <stdbool.h>
#include <unistd.h>
-#include <cutils/compiler.h>
+#include <cutils/compiler.h>
#ifdef ANDROID_SMP
#include <cutils/atomic-inline.h>
#else
@@ -67,7 +69,8 @@ __BEGIN_DECLS
#define ATRACE_TAG_RESOURCES (1<<13)
#define ATRACE_TAG_DALVIK (1<<14)
#define ATRACE_TAG_RS (1<<15)
-#define ATRACE_TAG_LAST ATRACE_TAG_RS
+#define ATRACE_TAG_BIONIC (1<<16)
+#define ATRACE_TAG_LAST ATRACE_TAG_BIONIC
// Reserved for initialization.
#define ATRACE_TAG_NOT_READY (1LL<<63)
@@ -217,8 +220,8 @@ static inline void atrace_async_begin(uint64_t tag, const char* name,
char buf[ATRACE_MESSAGE_LENGTH];
size_t len;
- len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "S|%d|%s|%d", getpid(),
- name, cookie);
+ len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "S|%d|%s|%" PRId32,
+ getpid(), name, cookie);
write(atrace_marker_fd, buf, len);
}
}
@@ -235,8 +238,8 @@ static inline void atrace_async_end(uint64_t tag, const char* name,
char buf[ATRACE_MESSAGE_LENGTH];
size_t len;
- len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "F|%d|%s|%d", getpid(),
- name, cookie);
+ len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "F|%d|%s|%" PRId32,
+ getpid(), name, cookie);
write(atrace_marker_fd, buf, len);
}
}
@@ -253,7 +256,7 @@ static inline void atrace_int(uint64_t tag, const char* name, int32_t value)
char buf[ATRACE_MESSAGE_LENGTH];
size_t len;
- len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "C|%d|%s|%d",
+ len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "C|%d|%s|%" PRId32,
getpid(), name, value);
write(atrace_marker_fd, buf, len);
}
@@ -270,7 +273,7 @@ static inline void atrace_int64(uint64_t tag, const char* name, int64_t value)
char buf[ATRACE_MESSAGE_LENGTH];
size_t len;
- len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "C|%d|%s|%lld",
+ len = snprintf(buf, ATRACE_MESSAGE_LENGTH, "C|%d|%s|%" PRId64,
getpid(), name, value);
write(atrace_marker_fd, buf, len);
}