am 3cd28adc: Merge "Fix issue #10427108: Google+ has long running process" into klp-dev

* commit '3cd28adc5df3cbf4a5269e30351e1f767b974036':
  Fix issue #10427108: Google+ has long running process
This commit is contained in:
Dianne Hackborn
2013-09-04 13:24:01 -07:00
committed by Android Git Automerger
3 changed files with 13 additions and 13 deletions

View File

@@ -1583,7 +1583,7 @@ public final class ProcessStats implements Parcelable {
final int NSRVS = pkgState.mServices.size();
if (NPROCS > 0 || NSRVS > 0) {
if (!printedHeader) {
pw.println("Per-Package Process Stats:");
pw.println("Per-Package Stats:");
printedHeader = true;
}
pw.print(" * "); pw.print(pkgName); pw.print(" / ");
@@ -1651,7 +1651,8 @@ public final class ProcessStats implements Parcelable {
continue;
}
if (!printedHeader) {
pw.println("Process Stats:");
pw.println();
pw.println("Per-Process Stats:");
printedHeader = true;
}
pw.print(" * "); pw.print(procName); pw.print(" / ");
@@ -2536,7 +2537,8 @@ public final class ProcessStats implements Parcelable {
if (mActive <= 0) {
throw new IllegalStateException("Service " + this + " has mActive=" + mActive);
}
int state = started ? memFactor : STATE_NOTHING;
final boolean wasStarted = mStartedState != STATE_NOTHING;
final int state = started ? memFactor : STATE_NOTHING;
if (mStartedState != state) {
if (mStartedState != STATE_NOTHING) {
addStateTime(SERVICE_STARTED + (mStartedState*SERVICE_COUNT),
@@ -2546,8 +2548,8 @@ public final class ProcessStats implements Parcelable {
}
mStartedState = state;
mStartedStartTime = now;
if (mProc != null) {
mProc = mProc.pullFixedProc(mPackage);
mProc = mProc.pullFixedProc(mPackage);
if (wasStarted != started) {
if (started) {
mProc.incStartedServices(memFactor, now);
} else {
@@ -2561,7 +2563,7 @@ public final class ProcessStats implements Parcelable {
if (mActive <= 0) {
throw new IllegalStateException("Service " + this + " has mActive=" + mActive);
}
int state = bound ? memFactor : STATE_NOTHING;
final int state = bound ? memFactor : STATE_NOTHING;
if (mBoundState != state) {
if (mBoundState != STATE_NOTHING) {
addStateTime(SERVICE_BOUND + (mBoundState*SERVICE_COUNT),
@@ -2578,7 +2580,7 @@ public final class ProcessStats implements Parcelable {
if (mActive <= 0) {
throw new IllegalStateException("Service " + this + " has mActive=" + mActive);
}
int state = executing ? memFactor : STATE_NOTHING;
final int state = executing ? memFactor : STATE_NOTHING;
if (mExecState != state) {
if (mExecState != STATE_NOTHING) {
addStateTime(SERVICE_EXEC + (mExecState*SERVICE_COUNT), now - mExecStartTime);

View File

@@ -35,7 +35,7 @@ import java.util.Comparator;
import java.util.StringTokenizer;
public class ProcessCpuTracker {
private static final String TAG = "ProcessStats";
private static final String TAG = "ProcessCpuTracker";
private static final boolean DEBUG = false;
private static final boolean localLOGV = DEBUG || false;

View File

@@ -677,11 +677,9 @@ public final class ProcessStatsService extends IProcessStats.Stub {
if (checkedIn) pw.print(" (checked in)");
pw.println(":");
// Don't really need to lock because we uniquely own this object.
if (dumpDetails) {
processStats.dumpLocked(pw, reqPackage, now, dumpAll);
} else {
processStats.dumpSummaryLocked(pw, reqPackage, now);
}
// Always dump summary here, dumping all details is just too
// much crud.
processStats.dumpSummaryLocked(pw, reqPackage, now);
}
if (isCheckin) {
// Rename file suffix to mark that it has checked in.