Merge change I5f1d2d24 into eclair-mr2
* changes: move event log tags used by ActivityManager into this package
This commit is contained in:
@ -6,7 +6,8 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(call all-subdir-java-files) \
|
||||
com/android/server/EventLogTags.logtags
|
||||
com/android/server/EventLogTags.logtags \
|
||||
com/android/server/am/EventLogTags.logtags
|
||||
|
||||
LOCAL_MODULE:= services
|
||||
|
||||
|
@ -152,44 +152,6 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
static final long MONITOR_CPU_MAX_TIME = 0x0fffffff; // wait possibly forever for next cpu sample.
|
||||
static final boolean MONITOR_THREAD_CPU_USAGE = false;
|
||||
|
||||
// Event log tags
|
||||
static final int LOG_CONFIGURATION_CHANGED = 2719;
|
||||
static final int LOG_CPU = 2721;
|
||||
static final int LOG_AM_FINISH_ACTIVITY = 30001;
|
||||
static final int LOG_TASK_TO_FRONT = 30002;
|
||||
static final int LOG_AM_NEW_INTENT = 30003;
|
||||
static final int LOG_AM_CREATE_TASK = 30004;
|
||||
static final int LOG_AM_CREATE_ACTIVITY = 30005;
|
||||
static final int LOG_AM_RESTART_ACTIVITY = 30006;
|
||||
static final int LOG_AM_RESUME_ACTIVITY = 30007;
|
||||
static final int LOG_ANR = 30008;
|
||||
static final int LOG_ACTIVITY_LAUNCH_TIME = 30009;
|
||||
static final int LOG_AM_PROCESS_BOUND = 30010;
|
||||
static final int LOG_AM_PROCESS_DIED = 30011;
|
||||
static final int LOG_AM_FAILED_TO_PAUSE_ACTIVITY = 30012;
|
||||
static final int LOG_AM_PAUSE_ACTIVITY = 30013;
|
||||
static final int LOG_AM_PROCESS_START = 30014;
|
||||
static final int LOG_AM_PROCESS_BAD = 30015;
|
||||
static final int LOG_AM_PROCESS_GOOD = 30016;
|
||||
static final int LOG_AM_LOW_MEMORY = 30017;
|
||||
static final int LOG_AM_DESTROY_ACTIVITY = 30018;
|
||||
static final int LOG_AM_RELAUNCH_RESUME_ACTIVITY = 30019;
|
||||
static final int LOG_AM_RELAUNCH_ACTIVITY = 30020;
|
||||
static final int LOG_AM_KILL_FOR_MEMORY = 30023;
|
||||
static final int LOG_AM_BROADCAST_DISCARD_FILTER = 30024;
|
||||
static final int LOG_AM_BROADCAST_DISCARD_APP = 30025;
|
||||
static final int LOG_AM_CREATE_SERVICE = 30030;
|
||||
static final int LOG_AM_DESTROY_SERVICE = 30031;
|
||||
static final int LOG_AM_PROCESS_CRASHED_TOO_MUCH = 30032;
|
||||
static final int LOG_AM_DROP_PROCESS = 30033;
|
||||
static final int LOG_AM_SERVICE_CRASHED_TOO_MUCH = 30034;
|
||||
static final int LOG_AM_SCHEDULE_SERVICE_RESTART = 30035;
|
||||
static final int LOG_AM_PROVIDER_LOST_PROCESS = 30036;
|
||||
static final int LOG_AM_PROCESS_START_TIMEOUT = 30037;
|
||||
|
||||
static final int LOG_BOOT_PROGRESS_AMS_READY = 3040;
|
||||
static final int LOG_BOOT_PROGRESS_ENABLE_SCREEN = 3050;
|
||||
|
||||
// The flags that are set for all calls we make to the package manager.
|
||||
static final int STOCK_PM_FLAGS = PackageManager.GET_SHARED_LIBRARY_FILES;
|
||||
|
||||
@ -1582,7 +1544,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
int total = user + system + iowait + irq + softIrq + idle;
|
||||
if (total == 0) total = 1;
|
||||
|
||||
EventLog.writeEvent(LOG_CPU,
|
||||
EventLog.writeEvent(EventLogTags.CPU,
|
||||
((user+system+iowait+irq+softIrq) * 100) / total,
|
||||
(user * 100) / total,
|
||||
(system * 100) / total,
|
||||
@ -1793,7 +1755,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
+ " with results=" + results + " newIntents=" + newIntents
|
||||
+ " andResume=" + andResume);
|
||||
if (andResume) {
|
||||
EventLog.writeEvent(LOG_AM_RESTART_ACTIVITY,
|
||||
EventLog.writeEvent(EventLogTags.AM_RESTART_ACTIVITY,
|
||||
System.identityHashCode(r),
|
||||
r.task.taskId, r.shortComponentName);
|
||||
}
|
||||
@ -1926,7 +1888,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
// if it had been bad.
|
||||
mProcessCrashTimes.remove(info.processName, info.uid);
|
||||
if (mBadProcesses.get(info.processName, info.uid) != null) {
|
||||
EventLog.writeEvent(LOG_AM_PROCESS_GOOD, info.uid,
|
||||
EventLog.writeEvent(EventLogTags.AM_PROC_GOOD, info.uid,
|
||||
info.processName);
|
||||
mBadProcesses.remove(info.processName, info.uid);
|
||||
if (app != null) {
|
||||
@ -2019,7 +1981,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
}
|
||||
}
|
||||
|
||||
EventLog.writeEvent(LOG_AM_PROCESS_START, pid, uid,
|
||||
EventLog.writeEvent(EventLogTags.AM_PROC_START, pid, uid,
|
||||
app.processName, hostingType,
|
||||
hostingNameStr != null ? hostingNameStr : "");
|
||||
|
||||
@ -2104,7 +2066,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
if (prev.app != null && prev.app.thread != null) {
|
||||
if (DEBUG_PAUSE) Log.v(TAG, "Enqueueing pending pause: " + prev);
|
||||
try {
|
||||
EventLog.writeEvent(LOG_AM_PAUSE_ACTIVITY,
|
||||
EventLog.writeEvent(EventLogTags.AM_PAUSE_ACTIVITY,
|
||||
System.identityHashCode(prev),
|
||||
prev.shortComponentName);
|
||||
prev.app.thread.schedulePauseActivity(prev, prev.finishing, userLeaving,
|
||||
@ -2775,7 +2737,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
next.app.thread.scheduleNewIntent(next.newIntents, next);
|
||||
}
|
||||
|
||||
EventLog.writeEvent(LOG_AM_RESUME_ACTIVITY,
|
||||
EventLog.writeEvent(EventLogTags.AM_RESUME_ACTIVITY,
|
||||
System.identityHashCode(next),
|
||||
next.task.taskId, next.shortComponentName);
|
||||
|
||||
@ -3436,7 +3398,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
// intent.
|
||||
top.task.setIntent(r.intent, r.info);
|
||||
}
|
||||
logStartActivity(LOG_AM_NEW_INTENT, r, top.task);
|
||||
logStartActivity(EventLogTags.AM_NEW_INTENT, r, top.task);
|
||||
deliverNewIntentLocked(top, r.intent);
|
||||
} else {
|
||||
// A special case: we need to
|
||||
@ -3458,7 +3420,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
// desires.
|
||||
if ((launchFlags&Intent.FLAG_ACTIVITY_SINGLE_TOP) != 0
|
||||
&& taskTop.realActivity.equals(r.realActivity)) {
|
||||
logStartActivity(LOG_AM_NEW_INTENT, r, taskTop.task);
|
||||
logStartActivity(EventLogTags.AM_NEW_INTENT, r, taskTop.task);
|
||||
if (taskTop.frontOfTask) {
|
||||
taskTop.task.setIntent(r.intent, r.info);
|
||||
}
|
||||
@ -3518,7 +3480,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
if ((launchFlags&Intent.FLAG_ACTIVITY_SINGLE_TOP) != 0
|
||||
|| r.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP
|
||||
|| r.launchMode == ActivityInfo.LAUNCH_SINGLE_TASK) {
|
||||
logStartActivity(LOG_AM_NEW_INTENT, top, top.task);
|
||||
logStartActivity(EventLogTags.AM_NEW_INTENT, top, top.task);
|
||||
// For paranoia, make sure we have correctly
|
||||
// resumed the top activity.
|
||||
if (doResume) {
|
||||
@ -3572,7 +3534,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
HistoryRecord top = performClearTaskLocked(
|
||||
sourceRecord.task.taskId, r, launchFlags, true);
|
||||
if (top != null) {
|
||||
logStartActivity(LOG_AM_NEW_INTENT, r, top.task);
|
||||
logStartActivity(EventLogTags.AM_NEW_INTENT, r, top.task);
|
||||
deliverNewIntentLocked(top, r.intent);
|
||||
// For paranoia, make sure we have correctly
|
||||
// resumed the top activity.
|
||||
@ -3589,7 +3551,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
int where = findActivityInHistoryLocked(r, sourceRecord.task.taskId);
|
||||
if (where >= 0) {
|
||||
HistoryRecord top = moveActivityToFrontLocked(where);
|
||||
logStartActivity(LOG_AM_NEW_INTENT, r, top.task);
|
||||
logStartActivity(EventLogTags.AM_NEW_INTENT, r, top.task);
|
||||
deliverNewIntentLocked(top, r.intent);
|
||||
if (doResume) {
|
||||
resumeTopActivityLocked(null);
|
||||
@ -3619,9 +3581,9 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
+ " in new guessed " + r.task);
|
||||
}
|
||||
if (newTask) {
|
||||
EventLog.writeEvent(LOG_AM_CREATE_TASK, r.task.taskId);
|
||||
EventLog.writeEvent(EventLogTags.AM_CREATE_TASK, r.task.taskId);
|
||||
}
|
||||
logStartActivity(LOG_AM_CREATE_ACTIVITY, r, r.task);
|
||||
logStartActivity(EventLogTags.AM_CREATE_ACTIVITY, r, r.task);
|
||||
startActivityLocked(r, newTask, doResume);
|
||||
return START_SUCCESS;
|
||||
}
|
||||
@ -3994,7 +3956,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
}
|
||||
|
||||
r.finishing = true;
|
||||
EventLog.writeEvent(LOG_AM_FINISH_ACTIVITY,
|
||||
EventLog.writeEvent(EventLogTags.AM_FINISH_ACTIVITY,
|
||||
System.identityHashCode(r),
|
||||
r.task.taskId, r.shortComponentName, reason);
|
||||
r.task.numActivities--;
|
||||
@ -4339,7 +4301,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
if (DEBUG_SWITCH) Log.v(
|
||||
TAG, "Removing activity: token=" + r
|
||||
+ ", app=" + (r.app != null ? r.app.processName : "(null)"));
|
||||
EventLog.writeEvent(LOG_AM_DESTROY_ACTIVITY,
|
||||
EventLog.writeEvent(EventLogTags.AM_DESTROY_ACTIVITY,
|
||||
System.identityHashCode(r),
|
||||
r.task.taskId, r.shortComponentName);
|
||||
|
||||
@ -4556,7 +4518,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
if (app.thread != null && app.thread.asBinder() == thread.asBinder()) {
|
||||
Log.i(TAG, "Process " + app.processName + " (pid " + pid
|
||||
+ ") has died.");
|
||||
EventLog.writeEvent(LOG_AM_PROCESS_DIED, app.pid, app.processName);
|
||||
EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.pid, app.processName);
|
||||
if (localLOGV) Log.v(
|
||||
TAG, "Dying app: " + app + ", pid: " + pid
|
||||
+ ", thread: " + thread.asBinder());
|
||||
@ -4580,7 +4542,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
|
||||
if (!haveBg) {
|
||||
Log.i(TAG, "Low Memory: No more background processes.");
|
||||
EventLog.writeEvent(LOG_AM_LOW_MEMORY, mLRUProcesses.size());
|
||||
EventLog.writeEvent(EventLogTags.AM_LOW_MEMORY, mLRUProcesses.size());
|
||||
long now = SystemClock.uptimeMillis();
|
||||
for (i=0; i<count; i++) {
|
||||
ProcessRecord rec = mLRUProcesses.get(i);
|
||||
@ -4628,7 +4590,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
}
|
||||
|
||||
// Log the ANR to the event log.
|
||||
EventLog.writeEvent(LOG_ANR, app.pid, app.processName, annotation);
|
||||
EventLog.writeEvent(EventLogTags.ANR, app.pid, app.processName, annotation);
|
||||
|
||||
// If we are on a secure build and the application is not interesting to the user (it is
|
||||
// not visible or in the background), just kill it instead of displaying a dialog.
|
||||
@ -5200,7 +5162,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
|
||||
if (gone) {
|
||||
Log.w(TAG, "Process " + app + " failed to attach");
|
||||
EventLog.writeEvent(LOG_AM_PROCESS_START_TIMEOUT, pid, app.info.uid,
|
||||
EventLog.writeEvent(EventLogTags.AM_PROCESS_START_TIMEOUT, pid, app.info.uid,
|
||||
app.processName);
|
||||
mProcessNames.remove(app.processName, app.info.uid);
|
||||
// Take care of any launching providers waiting for this process.
|
||||
@ -5258,7 +5220,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
if (app == null) {
|
||||
Log.w(TAG, "No pending application record for pid " + pid
|
||||
+ " (IApplicationThread " + thread + "); dropping process");
|
||||
EventLog.writeEvent(LOG_AM_DROP_PROCESS, pid);
|
||||
EventLog.writeEvent(EventLogTags.AM_DROP_PROCESS, pid);
|
||||
if (pid > 0 && pid != MY_PID) {
|
||||
Process.killProcess(pid);
|
||||
} else {
|
||||
@ -5292,7 +5254,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
return false;
|
||||
}
|
||||
|
||||
EventLog.writeEvent(LOG_AM_PROCESS_BOUND, app.pid, app.processName);
|
||||
EventLog.writeEvent(EventLogTags.AM_PROC_BOUND, app.pid, app.processName);
|
||||
|
||||
app.thread = thread;
|
||||
app.curAdj = app.setAdj = -100;
|
||||
@ -5512,7 +5474,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
}
|
||||
|
||||
void enableScreenAfterBoot() {
|
||||
EventLog.writeEvent(LOG_BOOT_PROGRESS_ENABLE_SCREEN,
|
||||
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_ENABLE_SCREEN,
|
||||
SystemClock.uptimeMillis());
|
||||
mWindowManager.enableScreenAfterBoot();
|
||||
}
|
||||
@ -5719,7 +5681,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
r.state = ActivityState.PAUSED;
|
||||
completePauseLocked();
|
||||
} else {
|
||||
EventLog.writeEvent(LOG_AM_FAILED_TO_PAUSE_ACTIVITY,
|
||||
EventLog.writeEvent(EventLogTags.AM_FAILED_TO_PAUSE,
|
||||
System.identityHashCode(r), r.shortComponentName,
|
||||
mPausingActivity != null
|
||||
? mPausingActivity.shortComponentName : "(none)");
|
||||
@ -7120,7 +7082,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
}
|
||||
|
||||
finishTaskMove(task);
|
||||
EventLog.writeEvent(LOG_TASK_TO_FRONT, task);
|
||||
EventLog.writeEvent(EventLogTags.AM_TASK_TO_FRONT, task);
|
||||
}
|
||||
|
||||
private final void finishTaskMove(int task) {
|
||||
@ -7717,7 +7679,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
+ cpi.applicationInfo.packageName + "/"
|
||||
+ cpi.applicationInfo.uid + " for provider "
|
||||
+ name + ": launching app became null");
|
||||
EventLog.writeEvent(LOG_AM_PROVIDER_LOST_PROCESS,
|
||||
EventLog.writeEvent(EventLogTags.AM_PROVIDER_LOST_PROCESS,
|
||||
cpi.applicationInfo.packageName,
|
||||
cpi.applicationInfo.uid, name);
|
||||
return null;
|
||||
@ -8230,7 +8192,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
if (adj >= worstType) {
|
||||
Log.w(TAG, "Killing for memory: " + proc + " (adj "
|
||||
+ adj + ")");
|
||||
EventLog.writeEvent(LOG_AM_KILL_FOR_MEMORY, proc.pid,
|
||||
EventLog.writeEvent(EventLogTags.AM_KILL_FOR_MEMORY, proc.pid,
|
||||
proc.processName, adj);
|
||||
killed = true;
|
||||
Process.killProcess(pids[i]);
|
||||
@ -8500,7 +8462,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
}
|
||||
|
||||
Log.i(TAG, "System now ready");
|
||||
EventLog.writeEvent(LOG_BOOT_PROGRESS_AMS_READY,
|
||||
EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_AMS_READY,
|
||||
SystemClock.uptimeMillis());
|
||||
|
||||
synchronized(this) {
|
||||
@ -8732,7 +8694,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
// This process loses!
|
||||
Log.w(TAG, "Process " + app.info.processName
|
||||
+ " has crashed too many times: killing!");
|
||||
EventLog.writeEvent(LOG_AM_PROCESS_CRASHED_TOO_MUCH,
|
||||
EventLog.writeEvent(EventLogTags.AM_PROCESS_CRASHED_TOO_MUCH,
|
||||
app.info.processName, app.info.uid);
|
||||
killServicesLocked(app, false);
|
||||
for (int i=mHistory.size()-1; i>=0; i--) {
|
||||
@ -8749,7 +8711,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
// explicitly does so... but for persistent process, we really
|
||||
// need to keep it running. If a persistent process is actually
|
||||
// repeatedly crashing, then badness for everyone.
|
||||
EventLog.writeEvent(LOG_AM_PROCESS_BAD, app.info.uid,
|
||||
EventLog.writeEvent(EventLogTags.AM_PROC_BAD, app.info.uid,
|
||||
app.info.processName);
|
||||
mBadProcesses.put(app.info.processName, app.info.uid, now);
|
||||
app.bad = true;
|
||||
@ -9823,7 +9785,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
if (sr.crashCount >= 2) {
|
||||
Log.w(TAG, "Service crashed " + sr.crashCount
|
||||
+ " times, stopping: " + sr);
|
||||
EventLog.writeEvent(LOG_AM_SERVICE_CRASHED_TOO_MUCH,
|
||||
EventLog.writeEvent(EventLogTags.AM_SERVICE_CRASHED_TOO_MUCH,
|
||||
sr.crashCount, sr.shortName, app.pid);
|
||||
bringDownServiceLocked(sr, true);
|
||||
} else if (!allowRestart) {
|
||||
@ -10433,7 +10395,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
+ r.name + " " + r.intent);
|
||||
mStringBuilder.setLength(0);
|
||||
r.intent.getIntent().toShortString(mStringBuilder, false, true);
|
||||
EventLog.writeEvent(LOG_AM_CREATE_SERVICE,
|
||||
EventLog.writeEvent(EventLogTags.AM_CREATE_SERVICE,
|
||||
System.identityHashCode(r), r.shortName,
|
||||
mStringBuilder.toString(), r.app.pid);
|
||||
synchronized (r.stats.getBatteryStats()) {
|
||||
@ -10551,7 +10513,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
r.nextRestartTime = SystemClock.uptimeMillis() + r.restartDelay;
|
||||
Log.w(TAG, "Scheduling restart of crashed service "
|
||||
+ r.shortName + " in " + r.restartDelay + "ms");
|
||||
EventLog.writeEvent(LOG_AM_SCHEDULE_SERVICE_RESTART,
|
||||
EventLog.writeEvent(EventLogTags.AM_SCHEDULE_SERVICE_RESTART,
|
||||
r.shortName, r.restartDelay);
|
||||
|
||||
Message msg = Message.obtain();
|
||||
@ -10696,7 +10658,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
|
||||
if (DEBUG_SERVICE) Log.v(TAG, "Bringing down service " + r.name
|
||||
+ " " + r.intent);
|
||||
EventLog.writeEvent(LOG_AM_DESTROY_SERVICE,
|
||||
EventLog.writeEvent(EventLogTags.AM_DESTROY_SERVICE,
|
||||
System.identityHashCode(r), r.shortName,
|
||||
(r.app != null) ? r.app.pid : -1);
|
||||
|
||||
@ -12147,13 +12109,13 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
Object curReceiver = r.receivers.get(r.nextReceiver-1);
|
||||
if (curReceiver instanceof BroadcastFilter) {
|
||||
BroadcastFilter bf = (BroadcastFilter) curReceiver;
|
||||
EventLog.writeEvent(LOG_AM_BROADCAST_DISCARD_FILTER,
|
||||
EventLog.writeEvent(EventLogTags.AM_BROADCAST_DISCARD_FILTER,
|
||||
System.identityHashCode(r),
|
||||
r.intent.getAction(),
|
||||
r.nextReceiver - 1,
|
||||
System.identityHashCode(bf));
|
||||
} else {
|
||||
EventLog.writeEvent(LOG_AM_BROADCAST_DISCARD_APP,
|
||||
EventLog.writeEvent(EventLogTags.AM_BROADCAST_DISCARD_APP,
|
||||
System.identityHashCode(r),
|
||||
r.intent.getAction(),
|
||||
r.nextReceiver - 1,
|
||||
@ -12162,7 +12124,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
} else {
|
||||
Log.w(TAG, "Discarding broadcast before first receiver is invoked: "
|
||||
+ r);
|
||||
EventLog.writeEvent(LOG_AM_BROADCAST_DISCARD_APP,
|
||||
EventLog.writeEvent(EventLogTags.AM_BROADCAST_DISCARD_APP,
|
||||
System.identityHashCode(r),
|
||||
r.intent.getAction(),
|
||||
r.nextReceiver,
|
||||
@ -12832,7 +12794,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
Log.i(TAG, "Updating configuration to: " + values);
|
||||
}
|
||||
|
||||
EventLog.writeEvent(LOG_CONFIGURATION_CHANGED, changes);
|
||||
EventLog.writeEvent(EventLogTags.CONFIGURATION_CHANGED, changes);
|
||||
|
||||
if (values.locale != null) {
|
||||
saveLocaleLocked(values.locale,
|
||||
@ -12910,8 +12872,8 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
if (DEBUG_SWITCH) Log.v(TAG, "Relaunching: " + r
|
||||
+ " with results=" + results + " newIntents=" + newIntents
|
||||
+ " andResume=" + andResume);
|
||||
EventLog.writeEvent(andResume ? LOG_AM_RELAUNCH_RESUME_ACTIVITY
|
||||
: LOG_AM_RELAUNCH_ACTIVITY, System.identityHashCode(r),
|
||||
EventLog.writeEvent(andResume ? EventLogTags.AM_RELAUNCH_RESUME_ACTIVITY
|
||||
: EventLogTags.AM_RELAUNCH_ACTIVITY, System.identityHashCode(r),
|
||||
r.task.taskId, r.shortComponentName);
|
||||
|
||||
r.startFreezingScreenLocked(r.app, 0);
|
||||
|
82
services/java/com/android/server/am/EventLogTags.logtags
Normal file
82
services/java/com/android/server/am/EventLogTags.logtags
Normal file
@ -0,0 +1,82 @@
|
||||
# See system/core/logcat/event.logtags for a description of the format of this file.
|
||||
|
||||
option java_package com.android.server.am
|
||||
|
||||
2719 configuration_changed (config mask|1|5)
|
||||
2721 cpu (total|1|6),(user|1|6),(system|1|6),(iowait|1|6),(irq|1|6),(softirq|1|6)
|
||||
|
||||
# ActivityManagerService.systemReady() starts:
|
||||
3040 boot_progress_ams_ready (time|2|3)
|
||||
# ActivityManagerService calls enableScreenAfterBoot():
|
||||
3050 boot_progress_enable_screen (time|2|3)
|
||||
|
||||
# Do not change these names without updating the checkin_events setting in
|
||||
# google3/googledata/wireless/android/provisioning/gservices.config !!
|
||||
#
|
||||
# An activity is being finished:
|
||||
30001 am_finish_activity (Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3)
|
||||
# A task is being brought to the front of the screen:
|
||||
30002 am_task_to_front (Task|1|5)
|
||||
# An existing activity is being given a new intent:
|
||||
30003 am_new_intent (Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)
|
||||
# A new task is being created:
|
||||
30004 am_create_task (Task ID|1|5)
|
||||
# A new activity is being created in an existing task:
|
||||
30005 am_create_activity (Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5)
|
||||
# An activity has been resumed into the foreground but was not already running:
|
||||
30006 am_restart_activity (Token|1|5),(Task ID|1|5),(Component Name|3)
|
||||
# An activity has been resumed and is now in the foreground:
|
||||
30007 am_resume_activity (Token|1|5),(Task ID|1|5),(Component Name|3)
|
||||
# Application Not Responding
|
||||
30008 anr (pid|1|5),(Package Name|3),(reason|3)
|
||||
# Activity launch time
|
||||
30009 activity_launch_time (Token|1|5),(Component Name|3),(time|2|3)
|
||||
# Application process bound to work
|
||||
30010 am_proc_bound (PID|1|5),(Process Name|3)
|
||||
# Application process died
|
||||
30011 am_proc_died (PID|1|5),(Process Name|3)
|
||||
# The Activity Manager failed to pause the given activity.
|
||||
30012 am_failed_to_pause (Token|1|5),(Wanting to pause|3),(Currently pausing|3)
|
||||
# Attempting to pause the current activity
|
||||
30013 am_pause_activity (Token|1|5),(Component Name|3)
|
||||
# Application process has been started
|
||||
30014 am_proc_start (PID|1|5),(UID|1|5),(Process Name|3),(Type|3),(Component|3)
|
||||
# An application process has been marked as bad
|
||||
30015 am_proc_bad (UID|1|5),(Process Name|3)
|
||||
# An application process that was bad is now marked as good
|
||||
30016 am_proc_good (UID|1|5),(Process Name|3)
|
||||
# Reporting to applications that memory is low
|
||||
30017 am_low_memory (Num Processes|1|1)
|
||||
# An activity is being destroyed:
|
||||
30018 am_destroy_activity (Token|1|5),(Task ID|1|5),(Component Name|3)
|
||||
# An activity has been relaunched, resumed, and is now in the foreground:
|
||||
30019 am_relaunch_resume_activity (Token|1|5),(Task ID|1|5),(Component Name|3)
|
||||
# An activity has been relaunched:
|
||||
30020 am_relaunch_activity (Token|1|5),(Task ID|1|5),(Component Name|3)
|
||||
# The activity's onPause has been called.
|
||||
30021 am_on_paused_called (Component Name|3)
|
||||
# The activity's onResume has been called.
|
||||
30022 am_on_resume_called (Component Name|3)
|
||||
# Kill a process to reclaim memory.
|
||||
30023 am_kill_for_memory (PID|1|5),(Process Name|3),(OomAdj|1|5)
|
||||
# Discard an undelivered serialized broadcast (timeout/ANR/crash)
|
||||
30024 am_broadcast_discard_filter (Broadcast|1|5),(Action|3),(Receiver Number|1|1),(BroadcastFilter|1|5)
|
||||
30025 am_broadcast_discard_app (Broadcast|1|5),(Action|3),(Receiver Number|1|1),(App|3)
|
||||
# A service is being created
|
||||
30030 am_create_service (Service Record|1|5),(Name|3),(Intent|3),(PID|1|5)
|
||||
# A service is being destroyed
|
||||
30031 am_destroy_service (Service Record|1|5),(Name|3),(PID|1|5)
|
||||
# A process has crashed too many times, it is being cleared
|
||||
30032 am_process_crashed_too_much (Name|3),(PID|1|5)
|
||||
# An unknown process is trying to attach to the activity manager
|
||||
30033 am_drop_process (PID|1|5)
|
||||
# A service has crashed too many times, it is being stopped
|
||||
30034 am_service_crashed_too_much (Crash Count|1|1),(Component Name|3),(PID|1|5)
|
||||
# A service is going to be restarted after its process went away
|
||||
30035 am_schedule_service_restart (Component Name|3),(Time|2|3)
|
||||
# A client was waiting for a content provider, but its process was lost
|
||||
30036 am_provider_lost_process (Package Name|3),(UID|1|5),(Name|3)
|
||||
# The activity manager gave up on a new process taking too long to start
|
||||
30037 am_process_start_timeout (PID|1|5),(UID|1|5),(Process Name|3)
|
||||
|
||||
|
@ -373,7 +373,7 @@ class HistoryRecord extends IApplicationToken.Stub {
|
||||
final long totalTime = service.mInitialStartTime != 0
|
||||
? (curTime - service.mInitialStartTime) : thisTime;
|
||||
if (ActivityManagerService.SHOW_ACTIVITY_START_TIME) {
|
||||
EventLog.writeEvent(ActivityManagerService.LOG_ACTIVITY_LAUNCH_TIME,
|
||||
EventLog.writeEvent(EventLogTags.ACTIVITY_LAUNCH_TIME,
|
||||
System.identityHashCode(this), shortComponentName,
|
||||
thisTime, totalTime);
|
||||
StringBuilder sb = service.mStringBuilder;
|
||||
|
Reference in New Issue
Block a user