Merge "Hide warning in cutils/trace.h" am: 5cf3db6d2b am: a802e570b3

am: 06ec4b1352

Change-Id: If41d5b551ffe237922f4768cf403cadf7ee15887
This commit is contained in:
Colin Cross 2016-09-22 09:15:21 +00:00 committed by android-build-merger
commit 7673c4dc88
3 changed files with 9 additions and 2 deletions

View file

@ -189,8 +189,8 @@ static inline void atrace_begin(uint64_t tag, const char* name)
static inline void atrace_end(uint64_t tag)
{
if (CC_UNLIKELY(atrace_is_tag_enabled(tag))) {
char c = 'E';
write(atrace_marker_fd, &c, 1);
void atrace_end_body();
atrace_end_body();
}
}

View file

@ -196,6 +196,12 @@ void atrace_begin_body(const char* name)
write(atrace_marker_fd, buf, len);
}
void atrace_end_body()
{
char c = 'E';
write(atrace_marker_fd, &c, 1);
}
#define WRITE_MSG(format_begin, format_end, pid, name, value) { \
char buf[ATRACE_MESSAGE_LENGTH]; \
int len = snprintf(buf, sizeof(buf), format_begin "%s" format_end, pid, \

View file

@ -29,6 +29,7 @@ void atrace_set_tracing_enabled(bool enabled __unused) { }
void atrace_update_tags() { }
void atrace_setup() { }
void atrace_begin_body(const char* name __unused) { }
void atrace_end_body() { }
void atrace_async_begin_body(const char* name __unused, int32_t cookie __unused) { }
void atrace_async_end_body(const char* name __unused, int32_t cookie __unused) { }
void atrace_int_body(const char* name __unused, int32_t value __unused) { }