diff options
author | Sudheer Shanka <sudheersai@google.com> | 2021-08-26 03:23:37 +0000 |
---|---|---|
committer | Sudheer Shanka <sudheersai@google.com> | 2021-08-31 22:24:14 +0000 |
commit | 1723e2fef9636cacc27770da70923ba8f0b74535 (patch) | |
tree | 698eec02abdcc9f100cac1ba349d7663209cb505 /services/java | |
parent | 6ba02399477fb887552e3e162c2b86df7ea605fc (diff) |
Start blob store service synchronously.
Starting the service asynchronously is resulting in a
race condition when accessing a shared data structure.
We could add a lock to guard this data structure but
this is resulting in a slightly worse performance than
starting the service synchronously.
Bug: 194428627
Bug: 179687249
Test: treehugger verification
Change-Id: Ib4d610e8a221f94a3dcc8475371b4a05e5582149
Merged-In: Ib4d610e8a221f94a3dcc8475371b4a05e5582149
(cherry picked from commit 9df4ac60939841472e9e29261c55be4dd2030f9a)
Diffstat (limited to 'services/java')
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index 91d4f7e2a24d..33e32393090e 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -435,7 +435,6 @@ public final class SystemServer implements Dumpable { private static final String SYSPROP_START_UPTIME = "sys.system_server.start_uptime"; private Future<?> mZygotePreload; - private Future<?> mBlobStoreServiceStart; private final SystemServerDumper mDumper = new SystemServerDumper(); @@ -2250,12 +2249,9 @@ public final class SystemServer implements Dumpable { t.traceEnd(); } - mBlobStoreServiceStart = SystemServerInitThreadPool.submit(() -> { - final TimingsTraceAndSlog traceLog = TimingsTraceAndSlog.newAsyncLog(); - traceLog.traceBegin(START_BLOB_STORE_SERVICE); - mSystemServiceManager.startService(BLOB_STORE_MANAGER_SERVICE_CLASS); - traceLog.traceEnd(); - }, START_BLOB_STORE_SERVICE); + t.traceBegin(START_BLOB_STORE_SERVICE); + mSystemServiceManager.startService(BLOB_STORE_MANAGER_SERVICE_CLASS); + t.traceEnd(); // Dreams (interactive idle-time views, a/k/a screen savers, and doze mode) t.traceBegin("StartDreamManager"); @@ -2650,9 +2646,6 @@ public final class SystemServer implements Dumpable { mSystemServiceManager.startService(MEDIA_COMMUNICATION_SERVICE_CLASS); t.traceEnd(); - ConcurrentUtils.waitForFutureNoInterrupt(mBlobStoreServiceStart, - START_BLOB_STORE_SERVICE); - // These are needed to propagate to the runnable below. final NetworkManagementService networkManagementF = networkManagement; final NetworkStatsService networkStatsF = networkStats; |