Merge "Fix issue #10427108: Google+ has long running process" into klp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3cd28adc5d
@@ -1583,7 +1583,7 @@ public final class ProcessStats implements Parcelable {
|
|||||||
final int NSRVS = pkgState.mServices.size();
|
final int NSRVS = pkgState.mServices.size();
|
||||||
if (NPROCS > 0 || NSRVS > 0) {
|
if (NPROCS > 0 || NSRVS > 0) {
|
||||||
if (!printedHeader) {
|
if (!printedHeader) {
|
||||||
pw.println("Per-Package Process Stats:");
|
pw.println("Per-Package Stats:");
|
||||||
printedHeader = true;
|
printedHeader = true;
|
||||||
}
|
}
|
||||||
pw.print(" * "); pw.print(pkgName); pw.print(" / ");
|
pw.print(" * "); pw.print(pkgName); pw.print(" / ");
|
||||||
@@ -1651,7 +1651,8 @@ public final class ProcessStats implements Parcelable {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!printedHeader) {
|
if (!printedHeader) {
|
||||||
pw.println("Process Stats:");
|
pw.println();
|
||||||
|
pw.println("Per-Process Stats:");
|
||||||
printedHeader = true;
|
printedHeader = true;
|
||||||
}
|
}
|
||||||
pw.print(" * "); pw.print(procName); pw.print(" / ");
|
pw.print(" * "); pw.print(procName); pw.print(" / ");
|
||||||
@@ -2536,7 +2537,8 @@ public final class ProcessStats implements Parcelable {
|
|||||||
if (mActive <= 0) {
|
if (mActive <= 0) {
|
||||||
throw new IllegalStateException("Service " + this + " has mActive=" + mActive);
|
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) {
|
||||||
if (mStartedState != STATE_NOTHING) {
|
if (mStartedState != STATE_NOTHING) {
|
||||||
addStateTime(SERVICE_STARTED + (mStartedState*SERVICE_COUNT),
|
addStateTime(SERVICE_STARTED + (mStartedState*SERVICE_COUNT),
|
||||||
@@ -2546,8 +2548,8 @@ public final class ProcessStats implements Parcelable {
|
|||||||
}
|
}
|
||||||
mStartedState = state;
|
mStartedState = state;
|
||||||
mStartedStartTime = now;
|
mStartedStartTime = now;
|
||||||
if (mProc != null) {
|
mProc = mProc.pullFixedProc(mPackage);
|
||||||
mProc = mProc.pullFixedProc(mPackage);
|
if (wasStarted != started) {
|
||||||
if (started) {
|
if (started) {
|
||||||
mProc.incStartedServices(memFactor, now);
|
mProc.incStartedServices(memFactor, now);
|
||||||
} else {
|
} else {
|
||||||
@@ -2561,7 +2563,7 @@ public final class ProcessStats implements Parcelable {
|
|||||||
if (mActive <= 0) {
|
if (mActive <= 0) {
|
||||||
throw new IllegalStateException("Service " + this + " has mActive=" + mActive);
|
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) {
|
||||||
if (mBoundState != STATE_NOTHING) {
|
if (mBoundState != STATE_NOTHING) {
|
||||||
addStateTime(SERVICE_BOUND + (mBoundState*SERVICE_COUNT),
|
addStateTime(SERVICE_BOUND + (mBoundState*SERVICE_COUNT),
|
||||||
@@ -2578,7 +2580,7 @@ public final class ProcessStats implements Parcelable {
|
|||||||
if (mActive <= 0) {
|
if (mActive <= 0) {
|
||||||
throw new IllegalStateException("Service " + this + " has mActive=" + mActive);
|
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) {
|
||||||
if (mExecState != STATE_NOTHING) {
|
if (mExecState != STATE_NOTHING) {
|
||||||
addStateTime(SERVICE_EXEC + (mExecState*SERVICE_COUNT), now - mExecStartTime);
|
addStateTime(SERVICE_EXEC + (mExecState*SERVICE_COUNT), now - mExecStartTime);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import java.util.Comparator;
|
|||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
public class ProcessCpuTracker {
|
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 DEBUG = false;
|
||||||
private static final boolean localLOGV = DEBUG || false;
|
private static final boolean localLOGV = DEBUG || false;
|
||||||
|
|
||||||
|
|||||||
@@ -677,11 +677,9 @@ public final class ProcessStatsService extends IProcessStats.Stub {
|
|||||||
if (checkedIn) pw.print(" (checked in)");
|
if (checkedIn) pw.print(" (checked in)");
|
||||||
pw.println(":");
|
pw.println(":");
|
||||||
// Don't really need to lock because we uniquely own this object.
|
// Don't really need to lock because we uniquely own this object.
|
||||||
if (dumpDetails) {
|
// Always dump summary here, dumping all details is just too
|
||||||
processStats.dumpLocked(pw, reqPackage, now, dumpAll);
|
// much crud.
|
||||||
} else {
|
processStats.dumpSummaryLocked(pw, reqPackage, now);
|
||||||
processStats.dumpSummaryLocked(pw, reqPackage, now);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (isCheckin) {
|
if (isCheckin) {
|
||||||
// Rename file suffix to mark that it has checked in.
|
// Rename file suffix to mark that it has checked in.
|
||||||
|
|||||||
Reference in New Issue
Block a user