Skip to content

Commit

Permalink
Merge "Process start optimization" into qt-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
TreeHugger Robot authored and Android (Google) Code Review committed May 14, 2019
2 parents abe2321 + 4b76bc1 commit d20761b
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions services/core/java/com/android/server/am/ProcessList.java
Original file line number Diff line number Diff line change
Expand Up @@ -1658,23 +1658,15 @@ boolean startProcessLocked(HostingRecord hostingRecord,
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);
Expand Down

0 comments on commit d20761b

Please sign in to comment.