mark atrace buffers as uninitialized

The atrace buffer does not need to be zero-initialized every time.

Test: memset calls from atrace_{begin,end}_body are gone
bug 155788214

Change-Id: I8082b6a9e6d6328f4aee3a22137977e9fae21933
This commit is contained in:
Tim Murray 2020-04-21 10:05:09 -07:00
parent 2f8bbb97c0
commit 0f85154117
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ void atrace_update_tags()
}
#define WRITE_MSG(format_begin, format_end, name, value) { \
char buf[ATRACE_MESSAGE_LENGTH]; \
char buf[ATRACE_MESSAGE_LENGTH] __attribute__((uninitialized)); \
int pid = getpid(); \
int len = snprintf(buf, sizeof(buf), format_begin "%s" format_end, pid, \
name, value); \