From 8e244b200d293a2fcdc85a0b60a06d6a3a304023 Mon Sep 17 00:00:00 2001 From: Tej Singh Date: Thu, 5 Mar 2020 18:10:16 -0800 Subject: [PATCH] Remove binder threadpool init from puller tests LibStatsPullTests used to manually create a binder threadpool. However, it seems that it is automatically done for us now, so we should not override the defaults since this can result in shrinking the threadpool: b/150904425. Test: atest LibStatsPullTests Bug: 150904425 Change-Id: I3f1a95aba3681c43fd46a9448c93a71fcb3133a9 --- .../tests/libstatspull/jni/stats_pull_helper.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp b/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp index eb97f6559b6d1..9e5aa952d9bc3 100644 --- a/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp +++ b/apex/statsd/tests/libstatspull/jni/stats_pull_helper.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include #include #include @@ -32,17 +31,6 @@ static int64_t sLatencyMillis; static int32_t sAtomsPerPull; static int32_t sNumPulls = 0; -static bool initialized = false; - -static void init() { - if (!initialized) { - initialized = true; - // Set up the binder - ABinderProcess_setThreadPoolMaxThreadCount(9); - ABinderProcess_startThreadPool(); - } -} - static AStatsManager_PullAtomCallbackReturn pullAtomCallback(int32_t atomTag, AStatsEventList* data, void* /*cookie*/) { sNumPulls++; @@ -62,7 +50,6 @@ Java_com_android_internal_os_statsd_libstats_LibStatsPullTests_registerStatsPull JNIEnv* /*env*/, jobject /* this */, jint atomTag, jlong timeoutNs, jlong coolDownNs, jint pullRetVal, jlong latencyMillis, int atomsPerPull) { - init(); sAtomTag = atomTag; sPullReturnVal = pullRetVal; sLatencyMillis = latencyMillis;