diff options
| -rw-r--r-- | libs/binder/tests/Android.bp | 1 | ||||
| -rw-r--r-- | libs/binder/tests/binderAllocationLimits.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libs/binder/tests/Android.bp b/libs/binder/tests/Android.bp index e460d2c965..92d132f37c 100644 --- a/libs/binder/tests/Android.bp +++ b/libs/binder/tests/Android.bp @@ -605,6 +605,7 @@ cc_test { shared_libs: [ "libbinder", "liblog", + "libcutils", "libutils", "libutilscallstack", "libbase", diff --git a/libs/binder/tests/binderAllocationLimits.cpp b/libs/binder/tests/binderAllocationLimits.cpp index a2ab8ab302..55a3916112 100644 --- a/libs/binder/tests/binderAllocationLimits.cpp +++ b/libs/binder/tests/binderAllocationLimits.cpp @@ -20,6 +20,7 @@ #include <binder/Parcel.h> #include <binder/RpcServer.h> #include <binder/RpcSession.h> +#include <cutils/trace.h> #include <gtest/gtest.h> #include <utils/CallStack.h> @@ -223,5 +224,10 @@ int main(int argc, char** argv) { return 1; } ::testing::InitGoogleTest(&argc, argv); + + // if tracing is enabled, take in one-time cost + (void)ATRACE_INIT(); + (void)ATRACE_GET_ENABLED_TAGS(); + return RUN_ALL_TESTS(); } |