summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVasu Nori <vnori@google.com>2010-09-21 11:36:48 -0700
committerVasu Nori <vnori@google.com>2010-09-21 12:07:24 -0700
commit9540a8d320d14b75203d9cc4ca65638fd06a94fb (patch)
tree26484c7ff248d25ea8d6360db8d1aa4ca35da99a /core
parenteb4d5b253733a699c16f0a50a8e8642ec49ed9ae (diff)
downloadframeworks_base-9540a8d320d14b75203d9cc4ca65638fd06a94fb.zip
frameworks_base-9540a8d320d14b75203d9cc4ca65638fd06a94fb.tar.gz
frameworks_base-9540a8d320d14b75203d9cc4ca65638fd06a94fb.tar.bz2
DO NOT MERGE - use appropriate names on SQL numbers in 'adb bugreport'
output now looks like the following SQL heap: 551 MEMORY_USED: 551 PAGECACHE_OVERFLOW: 113 MALLOC_SIZE: 50 DATABASES pgsz dbsz Lookaside(b) Dbname 1 148 500 contacts2.db 1 8 0 (attached) presence_db 1 18 31 :memory:SQL Change-Id: I8bb65a522fd9478ff2f6a8c27e69f9e6c10aef8a
Diffstat (limited to 'core')
-rw-r--r--core/java/android/app/ActivityThread.java11
-rw-r--r--core/java/android/database/sqlite/SQLiteDebug.java2
2 files changed, 7 insertions, 6 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index d8b5253..3c7bebf 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -363,7 +363,8 @@ public final class ActivityThread {
private static final String HEAP_COLUMN = "%17s %8s %8s %8s %8s";
private static final String ONE_COUNT_COLUMN = "%17s %8d";
private static final String TWO_COUNT_COLUMNS = "%17s %8d %17s %8d";
- private static final String DB_INFO_FORMAT = " %8d %8d %10d %s";
+ private static final String TWO_COUNT_COLUMNS_DB = "%20s %8d %20s %8d";
+ private static final String DB_INFO_FORMAT = " %8d %8d %14d %s";
// Formatting for checkin service - update version if row format changes
private static final int ACTIVITY_THREAD_CHECKIN_VERSION = 1;
@@ -806,15 +807,15 @@ public final class ActivityThread {
// SQLite mem info
pw.println(" ");
pw.println(" SQL");
- printRow(pw, TWO_COUNT_COLUMNS, "heap:", sqliteAllocated, "memoryUsed:",
+ printRow(pw, TWO_COUNT_COLUMNS_DB, "heap:", sqliteAllocated, "MEMORY_USED:",
stats.memoryUsed / 1024);
- printRow(pw, TWO_COUNT_COLUMNS, "pageCacheOverflo:", stats.pageCacheOverflo / 1024,
- "largestMemAlloc:", stats.largestMemAlloc / 1024);
+ printRow(pw, TWO_COUNT_COLUMNS_DB, "PAGECACHE_OVERFLOW:",
+ stats.pageCacheOverflo / 1024, "MALLOC_SIZE:", stats.largestMemAlloc / 1024);
pw.println(" ");
int N = stats.dbStats.size();
if (N > 0) {
pw.println(" DATABASES");
- printRow(pw, " %8s %8s %10s %s", "Pagesize", "Dbsize", "Lookaside", "Dbname");
+ printRow(pw, " %8s %8s %14s %s", "pgsz", "dbsz", "Lookaside(b)", "Dbname");
for (int i = 0; i < N; i++) {
DbStats dbStats = stats.dbStats.get(i);
printRow(pw, DB_INFO_FORMAT, dbStats.pageSize, dbStats.dbSize,
diff --git a/core/java/android/database/sqlite/SQLiteDebug.java b/core/java/android/database/sqlite/SQLiteDebug.java
index 89c3f96..b2a166b 100644
--- a/core/java/android/database/sqlite/SQLiteDebug.java
+++ b/core/java/android/database/sqlite/SQLiteDebug.java
@@ -134,7 +134,7 @@ public final class SQLiteDebug {
public DbStats(String dbName, long pageCount, long pageSize, int lookaside) {
this.dbName = dbName;
- this.pageSize = pageSize;
+ this.pageSize = pageSize / 1024;
dbSize = (pageCount * pageSize) / 1024;
this.lookaside = lookaside;
}