Add NDK async begin/end & counter

Bug: 111503982
Test: atest CtsAtraceHostTestCases
Change-Id: I038b76b505d3103f7b1e85a9469932d23cde2ab8
This commit is contained in:
John Reck
2018-12-05 18:16:39 -08:00
parent f660c012b0
commit 77b31a5eb1
5 changed files with 22 additions and 7 deletions

View File

@@ -28,3 +28,15 @@ void ATrace_beginSection(const char* sectionName) {
void ATrace_endSection() {
atrace_end(ATRACE_TAG_APP);
}
void ATrace_beginAsyncSection(const char* sectionName, int32_t cookie) {
atrace_async_begin(ATRACE_TAG_APP, sectionName, cookie);
}
void ATrace_endAsyncSection(const char* sectionName, int32_t cookie) {
atrace_async_end(ATRACE_TAG_APP, sectionName, cookie);
}
void ATrace_setCounter(const char* counterName, int64_t counterValue) {
atrace_int64(ATRACE_TAG_APP, counterName, counterValue);
}