summaryrefslogtreecommitdiffstats
path: root/include/cutils
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-03-20 22:27:19 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-20 22:27:19 +0000
commit2583dec08c3cf23896d873bfb56f781e2d536a9b (patch)
tree2045b153ca4428e8d2a308ec437a29b8b7ceb7a0 /include/cutils
parent8d0d00aad0e4e58ea991ba2c7f2abad42cb5e921 (diff)
parent3f4855c11889470691673c15f05361df61ea95b2 (diff)
downloadsystem_core-2583dec08c3cf23896d873bfb56f781e2d536a9b.zip
system_core-2583dec08c3cf23896d873bfb56f781e2d536a9b.tar.gz
system_core-2583dec08c3cf23896d873bfb56f781e2d536a9b.tar.bz2
am 3f4855c1: am 46f3ebba: am 28171447: Merge "cutils: trace 64-bit compile issues"
* commit '3f4855c11889470691673c15f05361df61ea95b2': cutils: trace 64-bit compile issues
Diffstat (limited to 'include/cutils')
-rw-r--r--include/cutils/trace.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/cutils/trace.h b/include/cutils/trace.h
index 1c8f107..dbd5e25 100644
--- a/include/cutils/trace.h
+++ b/include/cutils/trace.h
@@ -17,13 +17,14 @@
#ifndef _LIBS_CUTILS_TRACE_H
#define _LIBS_CUTILS_TRACE_H
+#include <inttypes.h>
+#include <stdbool.h>
+#include <stdint.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
@@ -217,8 +218,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 +236,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 +254,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 +271,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);
}