MemoryTracker/WeightWatcher improvements.
- remove dead pids - compact display Change-Id: I23f0de31f6ac6e9a556ac3c78b81eed94f59ca93
This commit is contained in:
@@ -127,7 +127,17 @@ public class MemoryTracker extends Service {
|
||||
info.uss[info.head] = info.currentUss = dinfo.getTotalPrivateDirty();
|
||||
if (info.currentPss > info.max) info.max = info.currentPss;
|
||||
if (info.currentUss > info.max) info.max = info.currentUss;
|
||||
Log.v(TAG, "update: pid " + pid + " pss=" + info.currentPss + " uss=" + info.currentUss);
|
||||
// Log.v(TAG, "update: pid " + pid + " pss=" + info.currentPss + " uss=" + info.currentUss);
|
||||
if (info.currentPss == 0) {
|
||||
Log.v(TAG, "update: pid " + pid + " has pss=0, it probably died");
|
||||
mData.remove(pid);
|
||||
}
|
||||
}
|
||||
for (int i=mPids.size()-1; i>=0; i--) {
|
||||
final long pid = mPids.get(i).intValue();
|
||||
if (mData.get(pid) == null) {
|
||||
mPids.remove(i);
|
||||
}
|
||||
}
|
||||
|
||||
// XXX: notify listeners
|
||||
|
||||
@@ -38,7 +38,7 @@ public class WeightWatcher extends LinearLayout {
|
||||
private static final int RAM_GRAPH_RSS_COLOR = 0xFF990000;
|
||||
private static final int RAM_GRAPH_PSS_COLOR = 0xFF99CC00;
|
||||
private static final int TEXT_COLOR = 0xFFFFFFFF;
|
||||
private static final int BACKGROUND_COLOR = 0xa0000000;
|
||||
private static final int BACKGROUND_COLOR = 0xc0000000;
|
||||
|
||||
private static final int UPDATE_RATE = 5000;
|
||||
|
||||
@@ -157,7 +157,7 @@ public class WeightWatcher extends LinearLayout {
|
||||
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
0,
|
||||
(int)(22 * dp),
|
||||
(int)(14 * dp),
|
||||
1f
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user