summaryrefslogtreecommitdiff
path: root/test/961-default-iface-resolution-gen/util-src/generate_java.py
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2024-01-09 19:22:26 +0000
committer Cherrypicker Worker <android-build-cherrypicker-worker@google.com> 2024-03-07 14:05:16 +0000
commit9f436a974a7ddd90c1ea85eca94215f7ec15d9ca (patch)
treea440728287d2626e2e698e1888e5a99d323a626e /test/961-default-iface-resolution-gen/util-src/generate_java.py
parentc15d3542ed0c6e059a0fe7a7a9a858e2d547096b (diff)
Throttle the creation of threads in Debouncer (again).
http://r.android.com/2887708 throttled the creation of ScheduledExecutorService, but it didn't actually throttle the creation of threads because we were using the ScheduledExecutorService created by Executors.newSingleThreadScheduledExecutor(), which has a surprising behavior that it destroys the single thread when the last task is cancelled, and re-creates it when a new task is scheduled. After this change, we use the ScheduledExecutorService created by Executors.newScheduledThreadPool(1 /* corePoolSize */) instead. Bug: 317234694 Test: - 1. Capture a trace starting from right before `adb shell start` with `--duration 120` and `-e sched:sched_wakeup_new`. 2. See only one thread creation initiated by "notifyDexLoad" (https://pprofng.corp.google.com/?id=721c44e87ff38dff14d4a6e7d6e1c010&pivot=%5Ecom%5C.android%5C.server%5C.pm%5C.PackageManagerService%5C$IPackageManagerImpl%5C.notifyDexLoad$) (cherry picked from https://android-review.googlesource.com/q/commit:4c5115d2196a6912102616c77aa233f14cb8b382) Merged-In: I21bd9040c1cf2508b3912236a25522f9bfb8e39f Change-Id: I21bd9040c1cf2508b3912236a25522f9bfb8e39f
Diffstat (limited to 'test/961-default-iface-resolution-gen/util-src/generate_java.py')
0 files changed, 0 insertions, 0 deletions