Add logging of graphics acceleration info to bugreports

Change-Id: I9fa4cda6ccf92df9d1c644ccdc0e7274a30106e0
This commit is contained in:
Chet Haase
2011-03-24 10:51:31 -07:00
parent 827107f4ec
commit 9c1e23baf5
11 changed files with 340 additions and 19 deletions

View File

@@ -394,6 +394,8 @@ public final class ActivityThread {
ParcelFileDescriptor fd;
}
native private void dumpGraphicsInfo(FileDescriptor fd);
private final class ApplicationThread extends ApplicationThreadNative {
private static final String HEAP_COLUMN = "%17s %8s %8s %8s %8s";
private static final String ONE_COUNT_COLUMN = "%17s %8d";
@@ -711,9 +713,14 @@ public final class ActivityThread {
}
}
}
@Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (args != null && args.length == 1 && args[0].equals("graphics")) {
pw.flush();
dumpGraphicsInfo(fd);
return;
}
long nativeMax = Debug.getNativeHeapSize() / 1024;
long nativeAllocated = Debug.getNativeHeapAllocatedSize() / 1024;
long nativeFree = Debug.getNativeHeapFreeSize() / 1024;