Further tweak to issue #issue #25371736: Don't include z-ram allocations in Android OS

Make sure the duration shown for z-ram is sane (the maximum of the
other process durations of that app).

Change-Id: I62c46b89f927b2c7c16f5c31f6910419b2bdd130
This commit is contained in:
Dianne Hackborn
2015-10-29 17:32:28 -07:00
parent 30bbd902dd
commit b6c7b05056
2 changed files with 12 additions and 7 deletions

View File

@@ -72,13 +72,14 @@ public final class ProcStatsEntry implements Parcelable {
+ " avgpss=" + mAvgBgMem + " weight=" + mBgWeight);
}
public ProcStatsEntry(String pkgName, int uid, String procName, long duration, long mem) {
public ProcStatsEntry(String pkgName, int uid, String procName, long duration, long mem,
long memDuration) {
mPackage = pkgName;
mUid = uid;
mName = procName;
mBgDuration = mRunDuration = duration;
mAvgBgMem = mMaxBgMem = mAvgRunMem = mMaxRunMem = mem;
mBgWeight = mRunWeight = ((double)duration) * mem;
mBgWeight = mRunWeight = ((double)memDuration) * mem;
if (DEBUG) Log.d(TAG, "New proc entry " + procName + ": dur=" + mBgDuration
+ " avgpss=" + mAvgBgMem + " weight=" + mBgWeight);
}