Merge change Iab5c49c7 into eclair-mr2
* changes: move event log tags used by system server into this package
This commit is contained in:
@ -5,7 +5,8 @@ LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(call all-subdir-java-files)
|
||||
$(call all-subdir-java-files) \
|
||||
com/android/server/EventLogTags.logtags
|
||||
|
||||
LOCAL_MODULE:= services
|
||||
|
||||
|
@ -102,22 +102,6 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
private static final int MSG_RUN_CLEAR = 4;
|
||||
private static final int MSG_RUN_INITIALIZE = 5;
|
||||
|
||||
// Event tags -- see system/core/logcat/event-log-tags
|
||||
private static final int BACKUP_DATA_CHANGED_EVENT = 2820;
|
||||
private static final int BACKUP_START_EVENT = 2821;
|
||||
private static final int BACKUP_TRANSPORT_FAILURE_EVENT = 2822;
|
||||
private static final int BACKUP_AGENT_FAILURE_EVENT = 2823;
|
||||
private static final int BACKUP_PACKAGE_EVENT = 2824;
|
||||
private static final int BACKUP_SUCCESS_EVENT = 2825;
|
||||
private static final int BACKUP_RESET_EVENT = 2826;
|
||||
private static final int BACKUP_INITIALIZE_EVENT = 2827;
|
||||
|
||||
private static final int RESTORE_START_EVENT = 2830;
|
||||
private static final int RESTORE_TRANSPORT_FAILURE_EVENT = 2831;
|
||||
private static final int RESTORE_AGENT_FAILURE_EVENT = 2832;
|
||||
private static final int RESTORE_PACKAGE_EVENT = 2833;
|
||||
private static final int RESTORE_SUCCESS_EVENT = 2834;
|
||||
|
||||
// Timeout interval for deciding that a bind or clear-data has taken too long
|
||||
static final long TIMEOUT_INTERVAL = 10 * 1000;
|
||||
|
||||
@ -1016,7 +1000,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
|
||||
|
||||
try {
|
||||
EventLog.writeEvent(BACKUP_START_EVENT, mTransport.transportDirName());
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_START, mTransport.transportDirName());
|
||||
|
||||
// If we haven't stored package manager metadata yet, we must init the transport.
|
||||
File pmState = new File(mStateDir, PACKAGE_MANAGER_SENTINEL);
|
||||
@ -1025,9 +1009,9 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
resetBackupState(mStateDir); // Just to make sure.
|
||||
status = mTransport.initializeDevice();
|
||||
if (status == BackupConstants.TRANSPORT_OK) {
|
||||
EventLog.writeEvent(BACKUP_INITIALIZE_EVENT);
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_INITIALIZE);
|
||||
} else {
|
||||
EventLog.writeEvent(BACKUP_TRANSPORT_FAILURE_EVENT, "(initialize)");
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, "(initialize)");
|
||||
Log.e(TAG, "Transport error in initializeDevice()");
|
||||
}
|
||||
}
|
||||
@ -1056,9 +1040,9 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
status = mTransport.finishBackup();
|
||||
if (status == BackupConstants.TRANSPORT_OK) {
|
||||
int millis = (int) (SystemClock.elapsedRealtime() - startRealtime);
|
||||
EventLog.writeEvent(BACKUP_SUCCESS_EVENT, mQueue.size(), millis);
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_SUCCESS, mQueue.size(), millis);
|
||||
} else {
|
||||
EventLog.writeEvent(BACKUP_TRANSPORT_FAILURE_EVENT, "(finish)");
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, "(finish)");
|
||||
Log.e(TAG, "Transport error in finishBackup()");
|
||||
}
|
||||
}
|
||||
@ -1067,7 +1051,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
// The backend reports that our dataset has been wiped. We need to
|
||||
// reset all of our bookkeeping and instead run a new backup pass for
|
||||
// everything. This must come after mBackupOrRestoreInProgress is cleared.
|
||||
EventLog.writeEvent(BACKUP_RESET_EVENT, mTransport.transportDirName());
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_RESET, mTransport.transportDirName());
|
||||
resetBackupState(mStateDir);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@ -1201,7 +1185,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
if (DEBUG) Log.v(TAG, "doBackup() success");
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error backing up " + packageName, e);
|
||||
EventLog.writeEvent(BACKUP_AGENT_FAILURE_EVENT, packageName, e.toString());
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_AGENT_FAILURE, packageName, e.toString());
|
||||
backupDataName.delete();
|
||||
newStateName.delete();
|
||||
return BackupConstants.TRANSPORT_ERROR;
|
||||
@ -1241,13 +1225,13 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
if (result == BackupConstants.TRANSPORT_OK) {
|
||||
backupDataName.delete();
|
||||
newStateName.renameTo(savedStateName);
|
||||
EventLog.writeEvent(BACKUP_PACKAGE_EVENT, packageName, size);
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_PACKAGE, packageName, size);
|
||||
} else {
|
||||
EventLog.writeEvent(BACKUP_TRANSPORT_FAILURE_EVENT, packageName);
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, packageName);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Transport error backing up " + packageName, e);
|
||||
EventLog.writeEvent(BACKUP_TRANSPORT_FAILURE_EVENT, packageName);
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, packageName);
|
||||
result = BackupConstants.TRANSPORT_ERROR;
|
||||
} finally {
|
||||
try { if (backupData != null) backupData.close(); } catch (IOException e) {}
|
||||
@ -1364,7 +1348,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
// build the set of apps to restore
|
||||
try {
|
||||
// TODO: Log this before getAvailableRestoreSets, somehow
|
||||
EventLog.writeEvent(RESTORE_START_EVENT, mTransport.transportDirName(), mToken);
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_START, mTransport.transportDirName(), mToken);
|
||||
|
||||
// Get the list of all packages which have backup enabled.
|
||||
// (Include the Package Manager metadata pseudo-package first.)
|
||||
@ -1391,24 +1375,24 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
if (mTransport.startRestore(mToken, restorePackages.toArray(new PackageInfo[0])) !=
|
||||
BackupConstants.TRANSPORT_OK) {
|
||||
Log.e(TAG, "Error starting restore operation");
|
||||
EventLog.writeEvent(RESTORE_TRANSPORT_FAILURE_EVENT);
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
String packageName = mTransport.nextRestorePackage();
|
||||
if (packageName == null) {
|
||||
Log.e(TAG, "Error getting first restore package");
|
||||
EventLog.writeEvent(RESTORE_TRANSPORT_FAILURE_EVENT);
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
|
||||
return;
|
||||
} else if (packageName.equals("")) {
|
||||
Log.i(TAG, "No restore data available");
|
||||
int millis = (int) (SystemClock.elapsedRealtime() - startRealtime);
|
||||
EventLog.writeEvent(RESTORE_SUCCESS_EVENT, 0, millis);
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_SUCCESS, 0, millis);
|
||||
return;
|
||||
} else if (!packageName.equals(PACKAGE_MANAGER_SENTINEL)) {
|
||||
Log.e(TAG, "Expected restore data for \"" + PACKAGE_MANAGER_SENTINEL
|
||||
+ "\", found only \"" + packageName + "\"");
|
||||
EventLog.writeEvent(RESTORE_AGENT_FAILURE_EVENT, PACKAGE_MANAGER_SENTINEL,
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, PACKAGE_MANAGER_SENTINEL,
|
||||
"Package manager data missing");
|
||||
return;
|
||||
}
|
||||
@ -1423,7 +1407,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
// the restore operation.
|
||||
if (!pmAgent.hasMetadata()) {
|
||||
Log.e(TAG, "No restore metadata available, so not restoring settings");
|
||||
EventLog.writeEvent(RESTORE_AGENT_FAILURE_EVENT, PACKAGE_MANAGER_SENTINEL,
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, PACKAGE_MANAGER_SENTINEL,
|
||||
"Package manager restore metadata missing");
|
||||
return;
|
||||
}
|
||||
@ -1434,7 +1418,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
|
||||
if (packageName == null) {
|
||||
Log.e(TAG, "Error getting next restore package");
|
||||
EventLog.writeEvent(RESTORE_TRANSPORT_FAILURE_EVENT);
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
|
||||
return;
|
||||
} else if (packageName.equals("")) {
|
||||
break;
|
||||
@ -1452,7 +1436,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
Metadata metaInfo = pmAgent.getRestoredMetadata(packageName);
|
||||
if (metaInfo == null) {
|
||||
Log.e(TAG, "Missing metadata for " + packageName);
|
||||
EventLog.writeEvent(RESTORE_AGENT_FAILURE_EVENT, packageName,
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName,
|
||||
"Package metadata missing");
|
||||
continue;
|
||||
}
|
||||
@ -1463,7 +1447,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
packageInfo = mPackageManager.getPackageInfo(packageName, flags);
|
||||
} catch (NameNotFoundException e) {
|
||||
Log.e(TAG, "Invalid package restoring data", e);
|
||||
EventLog.writeEvent(RESTORE_AGENT_FAILURE_EVENT, packageName,
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName,
|
||||
"Package missing on device");
|
||||
continue;
|
||||
}
|
||||
@ -1472,13 +1456,13 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
String message = "Version " + metaInfo.versionCode
|
||||
+ " > installed version " + packageInfo.versionCode;
|
||||
Log.w(TAG, "Package " + packageName + ": " + message);
|
||||
EventLog.writeEvent(RESTORE_AGENT_FAILURE_EVENT, packageName, message);
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName, message);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!signaturesMatch(metaInfo.signatures, packageInfo)) {
|
||||
Log.w(TAG, "Signature mismatch restoring " + packageName);
|
||||
EventLog.writeEvent(RESTORE_AGENT_FAILURE_EVENT, packageName,
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName,
|
||||
"Signature mismatch");
|
||||
continue;
|
||||
}
|
||||
@ -1505,7 +1489,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
: IApplicationThread.BACKUP_MODE_RESTORE));
|
||||
if (agent == null) {
|
||||
Log.w(TAG, "Can't find backup agent for " + packageName);
|
||||
EventLog.writeEvent(RESTORE_AGENT_FAILURE_EVENT, packageName,
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName,
|
||||
"Restore agent missing");
|
||||
continue;
|
||||
}
|
||||
@ -1536,7 +1520,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
// if we get this far, report success to the observer
|
||||
error = 0;
|
||||
int millis = (int) (SystemClock.elapsedRealtime() - startRealtime);
|
||||
EventLog.writeEvent(RESTORE_SUCCESS_EVENT, count, millis);
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_SUCCESS, count, millis);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error in restore thread", e);
|
||||
} finally {
|
||||
@ -1594,7 +1578,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
|
||||
if (mTransport.getRestoreData(backupData) != BackupConstants.TRANSPORT_OK) {
|
||||
Log.e(TAG, "Error getting restore data for " + packageName);
|
||||
EventLog.writeEvent(RESTORE_TRANSPORT_FAILURE_EVENT);
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1627,10 +1611,10 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
//newStateName.renameTo(savedStateName); // TODO: replace with this
|
||||
|
||||
int size = (int) backupDataName.length();
|
||||
EventLog.writeEvent(RESTORE_PACKAGE_EVENT, packageName, size);
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_PACKAGE, packageName, size);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Error restoring data for " + packageName, e);
|
||||
EventLog.writeEvent(RESTORE_AGENT_FAILURE_EVENT, packageName, e.toString());
|
||||
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName, e.toString());
|
||||
|
||||
// If the agent fails restore, it might have put the app's data
|
||||
// into an incoherent state. For consistency we wipe its data
|
||||
@ -1702,7 +1686,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
}
|
||||
|
||||
Log.i(TAG, "Initializing (wiping) backup transport storage: " + transportName);
|
||||
EventLog.writeEvent(BACKUP_START_EVENT, transport.transportDirName());
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_START, transport.transportDirName());
|
||||
long startRealtime = SystemClock.elapsedRealtime();
|
||||
int status = transport.initializeDevice();
|
||||
|
||||
@ -1714,9 +1698,9 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
if (status == BackupConstants.TRANSPORT_OK) {
|
||||
Log.i(TAG, "Device init successful");
|
||||
int millis = (int) (SystemClock.elapsedRealtime() - startRealtime);
|
||||
EventLog.writeEvent(BACKUP_INITIALIZE_EVENT);
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_INITIALIZE);
|
||||
resetBackupState(new File(mBaseStateDir, transport.transportDirName()));
|
||||
EventLog.writeEvent(BACKUP_SUCCESS_EVENT, 0, millis);
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_SUCCESS, 0, millis);
|
||||
synchronized (mQueueLock) {
|
||||
recordInitPendingLocked(false, transportName);
|
||||
}
|
||||
@ -1724,7 +1708,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
// If this didn't work, requeue this one and try again
|
||||
// after a suitable interval
|
||||
Log.e(TAG, "Transport error in initializeDevice()");
|
||||
EventLog.writeEvent(BACKUP_TRANSPORT_FAILURE_EVENT, "(initialize)");
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_TRANSPORT_FAILURE, "(initialize)");
|
||||
synchronized (mQueueLock) {
|
||||
recordInitPendingLocked(true, transportName);
|
||||
}
|
||||
@ -1757,7 +1741,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
// Record that we need a backup pass for the caller. Since multiple callers
|
||||
// may share a uid, we need to note all candidates within that uid and schedule
|
||||
// a backup pass for each of them.
|
||||
EventLog.writeEvent(BACKUP_DATA_CHANGED_EVENT, packageName);
|
||||
EventLog.writeEvent(EventLogTags.BACKUP_DATA_CHANGED, packageName);
|
||||
|
||||
// If the caller does not hold the BACKUP permission, it can only request a
|
||||
// backup of its own data.
|
||||
@ -2103,7 +2087,7 @@ class BackupManagerService extends IBackupManager.Stub {
|
||||
}
|
||||
if (mRestoreSets == null) { // valid transport; do the one-time fetch
|
||||
mRestoreSets = mRestoreTransport.getAvailableRestoreSets();
|
||||
if (mRestoreSets == null) EventLog.writeEvent(RESTORE_TRANSPORT_FAILURE_EVENT);
|
||||
if (mRestoreSets == null) EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
|
||||
}
|
||||
return mRestoreSets;
|
||||
} catch (Exception e) {
|
||||
|
@ -71,10 +71,6 @@ class BatteryService extends Binder {
|
||||
|
||||
private static final boolean LOCAL_LOGV = false;
|
||||
|
||||
static final int LOG_BATTERY_LEVEL = 2722;
|
||||
static final int LOG_BATTERY_STATUS = 2723;
|
||||
static final int LOG_BATTERY_DISCHARGE_STATUS = 2730;
|
||||
|
||||
static final int BATTERY_SCALE = 100; // battery capacity is a percentage
|
||||
|
||||
// Used locally for determining when to make a last ditch effort to log
|
||||
@ -229,7 +225,7 @@ class BatteryService extends Binder {
|
||||
if (mDischargeStartTime != 0 && mDischargeStartLevel != mBatteryLevel) {
|
||||
dischargeDuration = SystemClock.elapsedRealtime() - mDischargeStartTime;
|
||||
logOutlier = true;
|
||||
EventLog.writeEvent(LOG_BATTERY_DISCHARGE_STATUS, dischargeDuration,
|
||||
EventLog.writeEvent(EventLogTags.BATTERY_DISCHARGE, dischargeDuration,
|
||||
mDischargeStartLevel, mBatteryLevel);
|
||||
// make sure we see a discharge event before logging again
|
||||
mDischargeStartTime = 0;
|
||||
@ -244,14 +240,14 @@ class BatteryService extends Binder {
|
||||
mBatteryHealth != mLastBatteryHealth ||
|
||||
mBatteryPresent != mLastBatteryPresent ||
|
||||
mPlugType != mLastPlugType) {
|
||||
EventLog.writeEvent(LOG_BATTERY_STATUS,
|
||||
EventLog.writeEvent(EventLogTags.BATTERY_STATUS,
|
||||
mBatteryStatus, mBatteryHealth, mBatteryPresent ? 1 : 0,
|
||||
mPlugType, mBatteryTechnology);
|
||||
}
|
||||
if (mBatteryLevel != mLastBatteryLevel ||
|
||||
mBatteryVoltage != mLastBatteryVoltage ||
|
||||
mBatteryTemperature != mLastBatteryTemperature) {
|
||||
EventLog.writeEvent(LOG_BATTERY_LEVEL,
|
||||
EventLog.writeEvent(EventLogTags.BATTERY_LEVEL,
|
||||
mBatteryLevel, mBatteryVoltage, mBatteryTemperature);
|
||||
}
|
||||
if (mBatteryLevel != mLastBatteryLevel && mPlugType == BATTERY_PLUGGED_NONE) {
|
||||
|
@ -56,9 +56,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
private static final boolean DBG = true;
|
||||
private static final String TAG = "ConnectivityService";
|
||||
|
||||
// Event log tags (must be in sync with event-log-tags)
|
||||
private static final int EVENTLOG_CONNECTIVITY_STATE_CHANGED = 50020;
|
||||
|
||||
// how long to wait before switching back to a radio's default network
|
||||
private static final int RESTORE_DEFAULT_NETWORK_DELAY = 1 * 60 * 1000;
|
||||
// system property that can override the above value
|
||||
@ -1230,7 +1227,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
int eventLogParam = (info.getType() & 0x7) |
|
||||
((info.getDetailedState().ordinal() & 0x3f) << 3) |
|
||||
(info.getSubtype() << 9);
|
||||
EventLog.writeEvent(EVENTLOG_CONNECTIVITY_STATE_CHANGED,
|
||||
EventLog.writeEvent(EventLogTags.CONNECTIVITY_STATE_CHANGED,
|
||||
eventLogParam);
|
||||
|
||||
if (info.getDetailedState() ==
|
||||
|
@ -63,9 +63,6 @@ class DeviceStorageMonitorService extends Binder {
|
||||
private static final int LOW_MEMORY_NOTIFICATION_ID = 1;
|
||||
private static final int DEFAULT_THRESHOLD_PERCENTAGE = 10;
|
||||
private static final int DEFAULT_FREE_STORAGE_LOG_INTERVAL_IN_MINUTES = 12*60; //in minutes
|
||||
private static final int EVENT_LOG_STORAGE_BELOW_THRESHOLD = 2744;
|
||||
private static final int EVENT_LOG_LOW_STORAGE_NOTIFICATION = 2745;
|
||||
private static final int EVENT_LOG_FREE_STORAGE_LEFT = 2746;
|
||||
private static final long DEFAULT_DISK_FREE_CHANGE_REPORTING_THRESHOLD = 2 * 1024 * 1024; // 2MB
|
||||
private static final long DEFAULT_CHECK_INTERVAL = MONITOR_INTERVAL*60*1000;
|
||||
private long mFreeMem; // on /data
|
||||
@ -159,7 +156,7 @@ class DeviceStorageMonitorService extends Binder {
|
||||
// ignore; report -1
|
||||
}
|
||||
mCacheFileStats.restat(CACHE_PATH);
|
||||
EventLog.writeEvent(EVENT_LOG_FREE_STORAGE_LEFT,
|
||||
EventLog.writeEvent(EventLogTags.FREE_STORAGE_LEFT,
|
||||
mFreeMem, mFreeSystem, mFreeCache);
|
||||
}
|
||||
// Read the reporting threshold from Gservices
|
||||
@ -170,7 +167,7 @@ class DeviceStorageMonitorService extends Binder {
|
||||
long delta = mFreeMem - mLastReportedFreeMem;
|
||||
if (delta > threshold || delta < -threshold) {
|
||||
mLastReportedFreeMem = mFreeMem;
|
||||
EventLog.writeEvent(EVENT_LOG_STORAGE_BELOW_THRESHOLD, mFreeMem);
|
||||
EventLog.writeEvent(EventLogTags.FREE_STORAGE_CHANGED, mFreeMem);
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,7 +289,7 @@ class DeviceStorageMonitorService extends Binder {
|
||||
private final void sendNotification() {
|
||||
if(localLOGV) Log.i(TAG, "Sending low memory notification");
|
||||
//log the event to event log with the amount of free storage(in bytes) left on the device
|
||||
EventLog.writeEvent(EVENT_LOG_LOW_STORAGE_NOTIFICATION, mFreeMem);
|
||||
EventLog.writeEvent(EventLogTags.LOW_STORAGE, mFreeMem);
|
||||
// Pack up the values and broadcast them to everyone
|
||||
Intent lowMemIntent = new Intent(Intent.ACTION_MANAGE_PACKAGE_STORAGE);
|
||||
lowMemIntent.putExtra("memory", mFreeMem);
|
||||
|
139
services/java/com/android/server/EventLogTags.logtags
Normal file
139
services/java/com/android/server/EventLogTags.logtags
Normal file
@ -0,0 +1,139 @@
|
||||
# See system/core/logcat/event.logtags for a description of the format of this file.
|
||||
|
||||
option java_package com.android.server
|
||||
|
||||
# ---------------------------
|
||||
# BatteryService.java
|
||||
# ---------------------------
|
||||
2722 battery_level (level|1|6),(voltage|1|1),(temperature|1|1)
|
||||
2723 battery_status (status|1|5),(health|1|5),(present|1|5),(plugged|1|5),(technology|3)
|
||||
# This is logged when battery goes from discharging to charging.
|
||||
# It lets us count the total amount of time between charges and the discharge level
|
||||
2730 battery_discharge (duration|2|3),(minLevel|1|6),(maxLevel|1|6)
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# PowerManagerService.java
|
||||
# ---------------------------
|
||||
# This is logged when the device is being forced to sleep (typically by
|
||||
# the user pressing the power button).
|
||||
2724 power_sleep_requested (wakeLocksCleared|1|1)
|
||||
# This is logged when the screen on broadcast has completed
|
||||
2725 power_screen_broadcast_send (wakelockCount|1|1)
|
||||
# This is logged when the screen broadcast has completed
|
||||
2726 power_screen_broadcast_done (on|1|5),(broadcastDuration|2|3),(wakelockCount|1|1)
|
||||
# This is logged when the screen on broadcast has completed
|
||||
2727 power_screen_broadcast_stop (which|1|5),(wakelockCount|1|1)
|
||||
# This is logged when the screen is turned on or off.
|
||||
2728 power_screen_state (offOrOn|1|5),(becauseOfUser|1|5),(totalTouchDownTime|2|3),(touchCycles|1|1)
|
||||
# This is logged when the partial wake lock (keeping the device awake
|
||||
# regardless of whether the screen is off) is acquired or released.
|
||||
2729 power_partial_wake_state (releasedorAcquired|1|5),(tag|3)
|
||||
|
||||
#
|
||||
# Leave IDs through 2739 for more power logs (2730 used by battery_discharge above)
|
||||
#
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# DeviceStorageMonitoryService.java
|
||||
# ---------------------------
|
||||
# The disk space free on the /data partition, in bytes
|
||||
2744 free_storage_changed (data|2|2)
|
||||
# Device low memory notification and disk space free on the /data partition, in bytes at that time
|
||||
2745 low_storage (data|2|2)
|
||||
# disk space free on the /data, /system, and /cache partitions in bytes
|
||||
2746 free_storage_left (data|2|2),(system|2|2),(cache|2|2)
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# NotificationManagerService.java
|
||||
# ---------------------------
|
||||
# when a NotificationManager.notify is called
|
||||
2750 notification_enqueue (pkg|3),(id|1|5),(notification|3)
|
||||
# when someone tries to cancel a notification, the notification manager sometimes
|
||||
# calls this with flags too
|
||||
2751 notification_cancel (pkg|3),(id|1|5),(required_flags|1)
|
||||
# when someone tries to cancel all of the notifications for a particular package
|
||||
2752 notification_cancel_all (pkg|3),(required_flags|1)
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# Watchdog.java
|
||||
# ---------------------------
|
||||
2802 watchdog (Service|3)
|
||||
2803 watchdog_proc_pss (Process|3),(Pid|1|5),(Pss|1|2)
|
||||
2804 watchdog_soft_reset (Process|3),(Pid|1|5),(MaxPss|1|2),(Pss|1|2),(Skip|3)
|
||||
2805 watchdog_hard_reset (Process|3),(Pid|1|5),(MaxPss|1|2),(Pss|1|2)
|
||||
2806 watchdog_pss_stats (EmptyPss|1|2),(EmptyCount|1|1),(BackgroundPss|1|2),(BackgroundCount|1|1),(ServicePss|1|2),(ServiceCount|1|1),(VisiblePss|1|2),(VisibleCount|1|1),(ForegroundPss|1|2),(ForegroundCount|1|1),(NoPssCount|1|1)
|
||||
2807 watchdog_proc_stats (DeathsInOne|1|1),(DeathsInTwo|1|1),(DeathsInThree|1|1),(DeathsInFour|1|1),(DeathsInFive|1|1)
|
||||
2808 watchdog_scheduled_reboot (Now|2|1),(Interval|1|3),(StartTime|1|3),(Window|1|3),(Skip|3)
|
||||
2809 watchdog_meminfo (MemFree|1|2),(Buffers|1|2),(Cached|1|2),(Active|1|2),(Inactive|1|2),(AnonPages|1|2),(Mapped|1|2),(Slab|1|2),(SReclaimable|1|2),(SUnreclaim|1|2),(PageTables|1|2)
|
||||
2810 watchdog_vmstat (runtime|2|3),(pgfree|1|1),(pgactivate|1|1),(pgdeactivate|1|1),(pgfault|1|1),(pgmajfault|1|1)
|
||||
2811 watchdog_requested_reboot (NoWait|1|1),(ScheduleInterval|1|3),(RecheckInterval|1|3),(StartTime|1|3),(Window|1|3),(MinScreenOff|1|3),(MinNextAlarm|1|3)
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# BackupManagerService.java
|
||||
# ---------------------------
|
||||
2820 backup_data_changed (Package|3)
|
||||
2821 backup_start (Transport|3)
|
||||
2822 backup_transport_failure (Package|3)
|
||||
2823 backup_agent_failure (Package|3),(Message|3)
|
||||
2824 backup_package (Package|3),(Size|1|2)
|
||||
2825 backup_success (Packages|1|1),(Time|1|3)
|
||||
2826 backup_reset (Transport|3)
|
||||
2827 backup_initialize
|
||||
2830 restore_start (Transport|3),(Source|2|5)
|
||||
2831 restore_transport_failure
|
||||
2832 restore_agent_failure (Package|3),(Message|3)
|
||||
2833 restore_package (Package|3),(Size|1|2)
|
||||
2834 restore_success (Packages|1|1),(Time|1|3)
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# SystemServer.java
|
||||
# ---------------------------
|
||||
# SystemServer.run() starts:
|
||||
3010 boot_progress_system_run (time|2|3)
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# PackageManagerService.java
|
||||
# ---------------------------
|
||||
# Package Manager starts:
|
||||
3060 boot_progress_pms_start (time|2|3)
|
||||
# Package Manager .apk scan starts:
|
||||
3070 boot_progress_pms_system_scan_start (time|2|3)
|
||||
# Package Manager .apk scan starts:
|
||||
3080 boot_progress_pms_data_scan_start (time|2|3)
|
||||
# Package Manager .apk scan ends:
|
||||
3090 boot_progress_pms_scan_end (time|2|3)
|
||||
# Package Manager ready:
|
||||
3100 boot_progress_pms_ready (time|2|3)
|
||||
# + check activity_launch_time for Home app
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# WindowManagerService.java
|
||||
# ---------------------------
|
||||
# Out of memory for surfaces.
|
||||
31000 wm_no_surface_memory (Window|3),(PID|1|5),(Operation|3)
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# InputMethodManagerService.java
|
||||
# ---------------------------
|
||||
# Re-connecting to input method service because we haven't received its interface
|
||||
32000 imf_force_reconnect_ime (IME|4),(Time Since Connect|2|3),(Showing|1|1)
|
||||
|
||||
|
||||
# ---------------------------
|
||||
# ConnectivityService.java
|
||||
# ---------------------------
|
||||
# Connectivity state changed:
|
||||
# [31-13] Reserved for future use
|
||||
# [12- 9] Network subtype (for mobile network, as defined by TelephonyManager)
|
||||
# [ 8- 3] Detailed state ordinal (as defined by NetworkInfo.DetailedState)
|
||||
# [ 2- 0] Network type (as defined by ConnectivityManager)
|
||||
50020 connectivity_state_changed (custom|1|5)
|
@ -105,8 +105,6 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
|
||||
static final long TIME_TO_RECONNECT = 10*1000;
|
||||
|
||||
static final int LOG_IMF_FORCE_RECONNECT_IME = 32000;
|
||||
|
||||
final Context mContext;
|
||||
final Handler mHandler;
|
||||
final SettingsObserver mSettingsObserver;
|
||||
@ -720,8 +718,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
// to see if we can get back in touch with the service.
|
||||
return new InputBindResult(null, mCurId, mCurSeq);
|
||||
} else {
|
||||
EventLog.writeEvent(LOG_IMF_FORCE_RECONNECT_IME, mCurMethodId,
|
||||
SystemClock.uptimeMillis()-mLastBindTime, 0);
|
||||
EventLog.writeEvent(EventLogTags.IMF_FORCE_RECONNECT_IME,
|
||||
mCurMethodId, SystemClock.uptimeMillis()-mLastBindTime, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1015,7 +1013,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
// we have been sitting here too long with a connection to the
|
||||
// service and no interface received, so let's disconnect/connect
|
||||
// to try to prod things along.
|
||||
EventLog.writeEvent(LOG_IMF_FORCE_RECONNECT_IME, mCurMethodId,
|
||||
EventLog.writeEvent(EventLogTags.IMF_FORCE_RECONNECT_IME, mCurMethodId,
|
||||
SystemClock.uptimeMillis()-mLastBindTime,1);
|
||||
mContext.unbindService(this);
|
||||
mContext.bindService(mCurIntent, this, Context.BIND_AUTO_CREATE);
|
||||
|
@ -127,11 +127,6 @@ class NotificationManagerService extends INotificationManager.Stub
|
||||
private static final int BATTERY_BLINK_ON = 125;
|
||||
private static final int BATTERY_BLINK_OFF = 2875;
|
||||
|
||||
// Tag IDs for EventLog.
|
||||
private static final int EVENT_LOG_ENQUEUE = 2750;
|
||||
private static final int EVENT_LOG_CANCEL = 2751;
|
||||
private static final int EVENT_LOG_CANCEL_ALL = 2752;
|
||||
|
||||
private static String idDebugString(Context baseContext, String packageName, int id) {
|
||||
Context c = null;
|
||||
|
||||
@ -626,7 +621,7 @@ class NotificationManagerService extends INotificationManager.Stub
|
||||
// behalf of the download manager without affecting other apps.
|
||||
if (!pkg.equals("com.android.providers.downloads")
|
||||
|| Log.isLoggable("DownloadManager", Log.VERBOSE)) {
|
||||
EventLog.writeEvent(EVENT_LOG_ENQUEUE, pkg, id, notification.toString());
|
||||
EventLog.writeEvent(EventLogTags.NOTIFICATION_ENQUEUE, pkg, id, notification.toString());
|
||||
}
|
||||
|
||||
if (pkg == null || notification == null) {
|
||||
@ -873,7 +868,7 @@ class NotificationManagerService extends INotificationManager.Stub
|
||||
*/
|
||||
private void cancelNotification(String pkg, String tag, int id, int mustHaveFlags,
|
||||
int mustNotHaveFlags) {
|
||||
EventLog.writeEvent(EVENT_LOG_CANCEL, pkg, id, mustHaveFlags);
|
||||
EventLog.writeEvent(EventLogTags.NOTIFICATION_CANCEL, pkg, id, mustHaveFlags);
|
||||
|
||||
synchronized (mNotificationList) {
|
||||
int index = indexOfNotificationLocked(pkg, tag, id);
|
||||
@ -901,7 +896,7 @@ class NotificationManagerService extends INotificationManager.Stub
|
||||
*/
|
||||
void cancelAllNotificationsInt(String pkg, int mustHaveFlags,
|
||||
int mustNotHaveFlags) {
|
||||
EventLog.writeEvent(EVENT_LOG_CANCEL_ALL, pkg, mustHaveFlags);
|
||||
EventLog.writeEvent(EventLogTags.NOTIFICATION_CANCEL_ALL, pkg, mustHaveFlags);
|
||||
|
||||
synchronized (mNotificationList) {
|
||||
final int N = mNotificationList.size();
|
||||
|
@ -136,12 +136,6 @@ class PackageManagerService extends IPackageManager.Stub {
|
||||
static final int SCAN_FORWARD_LOCKED = 1<<4;
|
||||
static final int SCAN_NEW_INSTALL = 1<<5;
|
||||
|
||||
static final int LOG_BOOT_PROGRESS_PMS_START = 3060;
|
||||
static final int LOG_BOOT_PROGRESS_PMS_SYSTEM_SCAN_START = 3070;
|
||||
static final int LOG_BOOT_PROGRESS_PMS_DATA_SCAN_START = 3080;
|
||||
static final int LOG_BOOT_PROGRESS_PMS_SCAN_END = 3090;
|
||||
static final int LOG_BOOT_PROGRESS_PMS_READY = 3100;
|
||||
|
||||
final HandlerThread mHandlerThread = new HandlerThread("PackageManager",
|
||||
Process.THREAD_PRIORITY_BACKGROUND);
|
||||
final PackageHandler mHandler;
|
||||
@ -360,7 +354,7 @@ class PackageManagerService extends IPackageManager.Stub {
|
||||
}
|
||||
|
||||
public PackageManagerService(Context context, boolean factoryTest) {
|
||||
EventLog.writeEvent(LOG_BOOT_PROGRESS_PMS_START,
|
||||
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_START,
|
||||
SystemClock.uptimeMillis());
|
||||
|
||||
if (mSdkVersion <= 0) {
|
||||
@ -439,7 +433,7 @@ class PackageManagerService extends IPackageManager.Stub {
|
||||
mRestoredSettings = mSettings.readLP();
|
||||
long startTime = SystemClock.uptimeMillis();
|
||||
|
||||
EventLog.writeEvent(LOG_BOOT_PROGRESS_PMS_SYSTEM_SCAN_START,
|
||||
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_SYSTEM_SCAN_START,
|
||||
startTime);
|
||||
|
||||
int scanMode = SCAN_MONITOR;
|
||||
@ -582,7 +576,7 @@ class PackageManagerService extends IPackageManager.Stub {
|
||||
//delete tmp files
|
||||
deleteTempPackageFiles();
|
||||
|
||||
EventLog.writeEvent(LOG_BOOT_PROGRESS_PMS_DATA_SCAN_START,
|
||||
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_DATA_SCAN_START,
|
||||
SystemClock.uptimeMillis());
|
||||
mAppInstallObserver = new AppDirObserver(
|
||||
mAppInstallDir.getPath(), OBSERVER_EVENTS, false);
|
||||
@ -594,7 +588,7 @@ class PackageManagerService extends IPackageManager.Stub {
|
||||
mDrmAppInstallObserver.startWatching();
|
||||
scanDirLI(mDrmAppPrivateInstallDir, 0, scanMode | SCAN_FORWARD_LOCKED);
|
||||
|
||||
EventLog.writeEvent(LOG_BOOT_PROGRESS_PMS_SCAN_END,
|
||||
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_SCAN_END,
|
||||
SystemClock.uptimeMillis());
|
||||
Log.i(TAG, "Time to scan packages: "
|
||||
+ ((SystemClock.uptimeMillis()-startTime)/1000f)
|
||||
@ -604,7 +598,7 @@ class PackageManagerService extends IPackageManager.Stub {
|
||||
|
||||
mSettings.writeLP();
|
||||
|
||||
EventLog.writeEvent(LOG_BOOT_PROGRESS_PMS_READY,
|
||||
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_READY,
|
||||
SystemClock.uptimeMillis());
|
||||
|
||||
// Now after opening every single application zip, make sure they
|
||||
|
@ -145,13 +145,6 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
static final int INITIAL_BUTTON_BRIGHTNESS = Power.BRIGHTNESS_OFF;
|
||||
static final int INITIAL_KEYBOARD_BRIGHTNESS = Power.BRIGHTNESS_OFF;
|
||||
|
||||
static final int LOG_POWER_SLEEP_REQUESTED = 2724;
|
||||
static final int LOG_POWER_SCREEN_BROADCAST_SEND = 2725;
|
||||
static final int LOG_POWER_SCREEN_BROADCAST_DONE = 2726;
|
||||
static final int LOG_POWER_SCREEN_BROADCAST_STOP = 2727;
|
||||
static final int LOG_POWER_SCREEN_STATE = 2728;
|
||||
static final int LOG_POWER_PARTIAL_WAKE_STATE = 2729;
|
||||
|
||||
private final int MY_UID;
|
||||
|
||||
private boolean mDoneBooting = false;
|
||||
@ -686,7 +679,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
if (newlock) {
|
||||
mPartialCount++;
|
||||
if (mPartialCount == 1) {
|
||||
if (LOG_PARTIAL_WL) EventLog.writeEvent(LOG_POWER_PARTIAL_WAKE_STATE, 1, tag);
|
||||
if (LOG_PARTIAL_WL) EventLog.writeEvent(EventLogTags.POWER_PARTIAL_WAKE_STATE, 1, tag);
|
||||
}
|
||||
}
|
||||
Power.acquireWakeLock(Power.PARTIAL_WAKE_LOCK,PARTIAL_NAME);
|
||||
@ -748,7 +741,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
else if ((wl.flags & LOCK_MASK) == PowerManager.PARTIAL_WAKE_LOCK) {
|
||||
mPartialCount--;
|
||||
if (mPartialCount == 0) {
|
||||
if (LOG_PARTIAL_WL) EventLog.writeEvent(LOG_POWER_PARTIAL_WAKE_STATE, 0, wl.tag);
|
||||
if (LOG_PARTIAL_WL) EventLog.writeEvent(EventLogTags.POWER_PARTIAL_WAKE_STATE, 0, wl.tag);
|
||||
Power.releaseWakeLock(PARTIAL_NAME);
|
||||
}
|
||||
} else if ((wl.flags & LOCK_MASK) == PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK) {
|
||||
@ -1106,7 +1099,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
index = -1;
|
||||
// The wake lock was being held, but we're not actually going to do any
|
||||
// broadcasts, so release the wake lock.
|
||||
EventLog.writeEvent(LOG_POWER_SCREEN_BROADCAST_STOP, 1, mBroadcastWakeLock.mCount);
|
||||
EventLog.writeEvent(EventLogTags.POWER_SCREEN_BROADCAST_STOP, 1, mBroadcastWakeLock.mCount);
|
||||
mBroadcastWakeLock.release();
|
||||
}
|
||||
|
||||
@ -1117,7 +1110,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
// We always increment the ref count for each notification in the queue
|
||||
// and always decrement when that notification is handled.
|
||||
mBroadcastWakeLock.acquire();
|
||||
EventLog.writeEvent(LOG_POWER_SCREEN_BROADCAST_SEND, mBroadcastWakeLock.mCount);
|
||||
EventLog.writeEvent(EventLogTags.POWER_SCREEN_BROADCAST_SEND, mBroadcastWakeLock.mCount);
|
||||
mHandler.post(mNotificationTask);
|
||||
}
|
||||
}
|
||||
@ -1157,7 +1150,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
mScreenOnBroadcastDone, mHandler, 0, null, null);
|
||||
} else {
|
||||
synchronized (mLocks) {
|
||||
EventLog.writeEvent(LOG_POWER_SCREEN_BROADCAST_STOP, 2,
|
||||
EventLog.writeEvent(EventLogTags.POWER_SCREEN_BROADCAST_STOP, 2,
|
||||
mBroadcastWakeLock.mCount);
|
||||
mBroadcastWakeLock.release();
|
||||
}
|
||||
@ -1178,7 +1171,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
mScreenOffBroadcastDone, mHandler, 0, null, null);
|
||||
} else {
|
||||
synchronized (mLocks) {
|
||||
EventLog.writeEvent(LOG_POWER_SCREEN_BROADCAST_STOP, 3,
|
||||
EventLog.writeEvent(EventLogTags.POWER_SCREEN_BROADCAST_STOP, 3,
|
||||
mBroadcastWakeLock.mCount);
|
||||
mBroadcastWakeLock.release();
|
||||
}
|
||||
@ -1197,7 +1190,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
private BroadcastReceiver mScreenOnBroadcastDone = new BroadcastReceiver() {
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
synchronized (mLocks) {
|
||||
EventLog.writeEvent(LOG_POWER_SCREEN_BROADCAST_DONE, 1,
|
||||
EventLog.writeEvent(EventLogTags.POWER_SCREEN_BROADCAST_DONE, 1,
|
||||
SystemClock.uptimeMillis() - mScreenOnStart, mBroadcastWakeLock.mCount);
|
||||
mBroadcastWakeLock.release();
|
||||
}
|
||||
@ -1208,7 +1201,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
private BroadcastReceiver mScreenOffBroadcastDone = new BroadcastReceiver() {
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
synchronized (mLocks) {
|
||||
EventLog.writeEvent(LOG_POWER_SCREEN_BROADCAST_DONE, 0,
|
||||
EventLog.writeEvent(EventLogTags.POWER_SCREEN_BROADCAST_DONE, 0,
|
||||
SystemClock.uptimeMillis() - mScreenOffStart, mBroadcastWakeLock.mCount);
|
||||
mBroadcastWakeLock.release();
|
||||
}
|
||||
@ -1492,7 +1485,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
mLastTouchDown = 0;
|
||||
mTotalTouchDownTime = 0;
|
||||
mTouchCycles = 0;
|
||||
EventLog.writeEvent(LOG_POWER_SCREEN_STATE, 1, reason,
|
||||
EventLog.writeEvent(EventLogTags.POWER_SCREEN_STATE, 1, reason,
|
||||
mTotalTouchDownTime, mTouchCycles);
|
||||
if (err == 0) {
|
||||
mPowerState |= SCREEN_ON_BIT;
|
||||
@ -1527,7 +1520,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
// I don't think we need to check the current state here because all of these
|
||||
// Power.setScreenState and sendNotificationLocked can both handle being
|
||||
// called multiple times in the same state. -joeo
|
||||
EventLog.writeEvent(LOG_POWER_SCREEN_STATE, 0, reason, mTotalTouchDownTime, mTouchCycles);
|
||||
EventLog.writeEvent(EventLogTags.POWER_SCREEN_STATE, 0, reason, mTotalTouchDownTime, mTouchCycles);
|
||||
mLastTouchDown = 0;
|
||||
int err = setScreenStateLocked(false);
|
||||
if (err == 0) {
|
||||
@ -2159,7 +2152,7 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
numCleared++;
|
||||
}
|
||||
}
|
||||
EventLog.writeEvent(LOG_POWER_SLEEP_REQUESTED, numCleared);
|
||||
EventLog.writeEvent(EventLogTags.POWER_SLEEP_REQUESTED, numCleared);
|
||||
mStillNeedSleepNotification = true;
|
||||
mUserState = SCREEN_OFF;
|
||||
setPowerState(SCREEN_OFF, false, reason);
|
||||
|
@ -70,7 +70,7 @@ class ServerThread extends Thread {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
EventLog.writeEvent(LOG_BOOT_PROGRESS_SYSTEM_RUN,
|
||||
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_SYSTEM_RUN,
|
||||
SystemClock.uptimeMillis());
|
||||
|
||||
ActivityManagerService.prepareTraceFile(false); // create dir
|
||||
|
@ -52,16 +52,6 @@ public class Watchdog extends Thread {
|
||||
static final int GLOBAL_PSS = 2719;
|
||||
|
||||
static final int TIME_TO_WAIT = DB ? 15*1000 : 60*1000;
|
||||
static final int EVENT_LOG_TAG = 2802;
|
||||
static final int EVENT_LOG_PROC_PSS_TAG = 2803;
|
||||
static final int EVENT_LOG_SOFT_RESET_TAG = 2804;
|
||||
static final int EVENT_LOG_HARD_RESET_TAG = 2805;
|
||||
static final int EVENT_LOG_PSS_STATS_TAG = 2806;
|
||||
static final int EVENT_LOG_PROC_STATS_TAG = 2807;
|
||||
static final int EVENT_LOG_SCHEDULED_REBOOT_TAG = 2808;
|
||||
static final int EVENT_LOG_MEMINFO_TAG = 2809;
|
||||
static final int EVENT_LOG_VMSTAT_TAG = 2810;
|
||||
static final int EVENT_LOG_REQUESTED_REBOOT_TAG = 2811;
|
||||
|
||||
static final int MEMCHECK_DEFAULT_INTERVAL = DB ? 30 : 30*60; // 30 minutes
|
||||
static final int MEMCHECK_DEFAULT_LOG_REALTIME_INTERVAL = DB ? 60 : 2*60*60; // 2 hours
|
||||
@ -188,7 +178,7 @@ public class Watchdog extends Thread {
|
||||
} else {
|
||||
mState = STATE_HARD;
|
||||
}
|
||||
EventLog.writeEvent(EVENT_LOG_PROC_PSS_TAG, mProcessName, pid, mLastPss);
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG_PROC_PSS, mProcessName, pid, mLastPss);
|
||||
|
||||
if (mState == STATE_OK) {
|
||||
// Memory is good, don't recover.
|
||||
@ -197,7 +187,7 @@ public class Watchdog extends Thread {
|
||||
|
||||
if (mState == STATE_HARD) {
|
||||
// Memory is really bad, kill right now.
|
||||
EventLog.writeEvent(EVENT_LOG_HARD_RESET_TAG, mProcessName, pid,
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG_HARD_RESET, mProcessName, pid,
|
||||
mHardThreshold, mLastPss);
|
||||
return mEnabled;
|
||||
}
|
||||
@ -212,7 +202,7 @@ public class Watchdog extends Thread {
|
||||
} else {
|
||||
skipReason = shouldWeBeBrutalLocked(curTime);
|
||||
}
|
||||
EventLog.writeEvent(EVENT_LOG_SOFT_RESET_TAG, mProcessName, pid,
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG_SOFT_RESET, mProcessName, pid,
|
||||
mSoftThreshold, mLastPss, skipReason != null ? skipReason : "");
|
||||
if (skipReason != null) {
|
||||
mNeedScheduledCheck = true;
|
||||
@ -348,7 +338,7 @@ public class Watchdog extends Thread {
|
||||
mReqMinScreenOff = intent.getIntExtra("minScreenOff", -1);
|
||||
mReqMinNextAlarm = intent.getIntExtra("minNextAlarm", -1);
|
||||
mReqRecheckInterval = intent.getIntExtra("recheckInterval", -1);
|
||||
EventLog.writeEvent(EVENT_LOG_REQUESTED_REBOOT_TAG,
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG_REQUESTED_REBOOT,
|
||||
mReqRebootNoWait ? 1 : 0, mReqRebootInterval,
|
||||
mReqRecheckInterval, mReqRebootStartTime,
|
||||
mReqRebootWindow, mReqMinScreenOff, mReqMinNextAlarm);
|
||||
@ -561,21 +551,21 @@ public class Watchdog extends Thread {
|
||||
void logGlobalMemory() {
|
||||
PssStats stats = mPssStats;
|
||||
mActivity.collectPss(stats);
|
||||
EventLog.writeEvent(EVENT_LOG_PSS_STATS_TAG,
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG_PSS_STATS,
|
||||
stats.mEmptyPss, stats.mEmptyCount,
|
||||
stats.mBackgroundPss, stats.mBackgroundCount,
|
||||
stats.mServicePss, stats.mServiceCount,
|
||||
stats.mVisiblePss, stats.mVisibleCount,
|
||||
stats.mForegroundPss, stats.mForegroundCount,
|
||||
stats.mNoPssCount);
|
||||
EventLog.writeEvent(EVENT_LOG_PROC_STATS_TAG,
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG_PROC_STATS,
|
||||
stats.mProcDeaths[0], stats.mProcDeaths[1], stats.mProcDeaths[2],
|
||||
stats.mProcDeaths[3], stats.mProcDeaths[4]);
|
||||
Process.readProcLines("/proc/meminfo", mMemInfoFields, mMemInfoSizes);
|
||||
for (int i=0; i<mMemInfoSizes.length; i++) {
|
||||
mMemInfoSizes[i] *= 1024;
|
||||
}
|
||||
EventLog.writeEvent(EVENT_LOG_MEMINFO_TAG,
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG_MEMINFO,
|
||||
(int)mMemInfoSizes[0], (int)mMemInfoSizes[1], (int)mMemInfoSizes[2],
|
||||
(int)mMemInfoSizes[3], (int)mMemInfoSizes[4],
|
||||
(int)mMemInfoSizes[5], (int)mMemInfoSizes[6], (int)mMemInfoSizes[7],
|
||||
@ -589,7 +579,7 @@ public class Watchdog extends Thread {
|
||||
mVMStatSizes[i] -= mPrevVMStatSizes[i];
|
||||
mPrevVMStatSizes[i] = v;
|
||||
}
|
||||
EventLog.writeEvent(EVENT_LOG_VMSTAT_TAG, dur,
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG_VMSTAT, dur,
|
||||
(int)mVMStatSizes[0], (int)mVMStatSizes[1], (int)mVMStatSizes[2],
|
||||
(int)mVMStatSizes[3], (int)mVMStatSizes[4]);
|
||||
}
|
||||
@ -635,7 +625,7 @@ public class Watchdog extends Thread {
|
||||
(now-mBootTime) >= (rebootIntervalMillis-rebootWindowMillis)) {
|
||||
if (fromAlarm && rebootWindowMillis <= 0) {
|
||||
// No reboot window -- just immediately reboot.
|
||||
EventLog.writeEvent(EVENT_LOG_SCHEDULED_REBOOT_TAG, now,
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG_SCHEDULED_REBOOT, now,
|
||||
(int)rebootIntervalMillis, (int)rebootStartTime*1000,
|
||||
(int)rebootWindowMillis, "");
|
||||
rebootSystem("Checkin scheduled forced");
|
||||
@ -649,7 +639,7 @@ public class Watchdog extends Thread {
|
||||
now, rebootStartTime);
|
||||
} else if (now < (realStartTime+rebootWindowMillis)) {
|
||||
String doit = shouldWeBeBrutalLocked(now);
|
||||
EventLog.writeEvent(EVENT_LOG_SCHEDULED_REBOOT_TAG, now,
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG_SCHEDULED_REBOOT, now,
|
||||
(int)rebootInterval, (int)rebootStartTime*1000,
|
||||
(int)rebootWindowMillis, doit != null ? doit : "");
|
||||
if (doit == null) {
|
||||
@ -838,7 +828,7 @@ public class Watchdog extends Thread {
|
||||
// First send a SIGQUIT so that we can see where it was hung. Then
|
||||
// kill this process so that the system will restart.
|
||||
String name = (mCurrentMonitor != null) ? mCurrentMonitor.getClass().getName() : "null";
|
||||
EventLog.writeEvent(EVENT_LOG_TAG, name);
|
||||
EventLog.writeEvent(EventLogTags.WATCHDOG, name);
|
||||
Process.sendSignal(Process.myPid(), Process.SIGNAL_QUIT);
|
||||
|
||||
// Wait a bit longer before killing so we can make sure that the stacks are captured.
|
||||
|
@ -152,8 +152,6 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
static final boolean BLUR = true;
|
||||
static final boolean localLOGV = DEBUG;
|
||||
|
||||
static final int LOG_WM_NO_SURFACE_MEMORY = 31000;
|
||||
|
||||
/** How long to wait for subsequent key repeats, in milliseconds */
|
||||
static final int KEY_REPEAT_DELAY = 50;
|
||||
|
||||
@ -10384,7 +10382,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
void reclaimSomeSurfaceMemoryLocked(WindowState win, String operation) {
|
||||
final Surface surface = win.mSurface;
|
||||
|
||||
EventLog.writeEvent(LOG_WM_NO_SURFACE_MEMORY, win.toString(),
|
||||
EventLog.writeEvent(EventLogTags.WM_NO_SURFACE_MEMORY, win.toString(),
|
||||
win.mSession.mPid, operation);
|
||||
|
||||
if (mForceRemoves == null) {
|
||||
|
Reference in New Issue
Block a user