Process start optimization

Remove the check for valid process start, as it's redundant.
(Contributed by Huawei)

Bug: 111815164
Test: am perf tests
Change-Id: I53f60b854ccc45f5f00bc3964fa4f46209f92e72
This commit is contained in:
Amith Yamasani
2019-04-24 11:46:43 -07:00
parent 332d34e30d
commit 4b76bc1ce1

View File

@@ -1658,23 +1658,15 @@ public final class ProcessList {
app.killed = false;
final long startSeq = app.startSeq = ++mProcStartSeqCounter;
app.setStartParams(uid, hostingRecord, seInfo, startTime);
app.setUsingWrapper(invokeWith != null
|| SystemProperties.get("wrap." + app.processName) != null);
mPendingStarts.put(startSeq, app);
if (mService.mConstants.FLAG_PROCESS_START_ASYNC) {
if (DEBUG_PROCESSES) Slog.i(TAG_PROCESSES,
"Posting procStart msg for " + app.toShortString());
mService.mProcStartHandler.post(() -> {
try {
synchronized (mService) {
final String reason = isProcStartValidLocked(app, startSeq);
if (reason != null) {
Slog.w(TAG_PROCESSES, app + " not valid anymore,"
+ " don't start process, " + reason);
app.pendingStart = false;
return;
}
app.setUsingWrapper(invokeWith != null
|| SystemProperties.get("wrap." + app.processName) != null);
mPendingStarts.put(startSeq, app);
}
final Process.ProcessStartResult startResult = startProcess(app.hostingRecord,
entryPoint, app, app.startUid, gids, runtimeFlags, mountExternal,
app.seInfo, requiredAbi, instructionSet, invokeWith, app.startTime);