Loading core/java/android/app/Activity.java +20 −26 Original line number Original line Diff line number Diff line Loading @@ -769,17 +769,6 @@ public class Activity extends ContextThemeWrapper private static final String KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME = "com.android.systemui"; private static final String KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME = "com.android.systemui"; private static final int LOG_AM_ON_CREATE_CALLED = 30057; private static final int LOG_AM_ON_START_CALLED = 30059; private static final int LOG_AM_ON_RESUME_CALLED = 30022; private static final int LOG_AM_ON_PAUSE_CALLED = 30021; private static final int LOG_AM_ON_STOP_CALLED = 30049; private static final int LOG_AM_ON_RESTART_CALLED = 30058; private static final int LOG_AM_ON_DESTROY_CALLED = 30060; private static final int LOG_AM_ON_ACTIVITY_RESULT_CALLED = 30062; private static final int LOG_AM_ON_TOP_RESUMED_GAINED_CALLED = 30064; private static final int LOG_AM_ON_TOP_RESUMED_LOST_CALLED = 30065; private static class ManagedDialog { private static class ManagedDialog { Dialog mDialog; Dialog mDialog; Bundle mArgs; Bundle mArgs; Loading Loading @@ -1863,8 +1852,13 @@ public class Activity extends ContextThemeWrapper final void performTopResumedActivityChanged(boolean isTopResumedActivity, String reason) { final void performTopResumedActivityChanged(boolean isTopResumedActivity, String reason) { onTopResumedActivityChanged(isTopResumedActivity); onTopResumedActivityChanged(isTopResumedActivity); writeEventLog(isTopResumedActivity if (isTopResumedActivity) { ? LOG_AM_ON_TOP_RESUMED_GAINED_CALLED : LOG_AM_ON_TOP_RESUMED_LOST_CALLED, reason); EventLogTags.writeWmOnTopResumedGainedCalled(mIdent, getComponentName().getClassName(), reason); } else { EventLogTags.writeWmOnTopResumedLostCalled(mIdent, getComponentName().getClassName(), reason); } } } void setVoiceInteractor(IVoiceInteractor voiceInteractor) { void setVoiceInteractor(IVoiceInteractor voiceInteractor) { Loading Loading @@ -7898,7 +7892,8 @@ public class Activity extends ContextThemeWrapper } else { } else { onCreate(icicle); onCreate(icicle); } } writeEventLog(LOG_AM_ON_CREATE_CALLED, "performCreate"); EventLogTags.writeWmOnCreateCalled(mIdent, getComponentName().getClassName(), "performCreate"); mActivityTransitionState.readState(icicle); mActivityTransitionState.readState(icicle); mVisibleFromClient = !mWindow.getWindowStyle().getBoolean( mVisibleFromClient = !mWindow.getWindowStyle().getBoolean( Loading @@ -7920,7 +7915,7 @@ public class Activity extends ContextThemeWrapper mCalled = false; mCalled = false; mFragments.execPendingActions(); mFragments.execPendingActions(); mInstrumentation.callActivityOnStart(this); mInstrumentation.callActivityOnStart(this); writeEventLog(LOG_AM_ON_START_CALLED, reason); EventLogTags.writeWmOnStartCalled(mIdent, getComponentName().getClassName(), reason); if (!mCalled) { if (!mCalled) { throw new SuperNotCalledException( throw new SuperNotCalledException( Loading Loading @@ -7998,7 +7993,7 @@ public class Activity extends ContextThemeWrapper mCalled = false; mCalled = false; mInstrumentation.callActivityOnRestart(this); mInstrumentation.callActivityOnRestart(this); writeEventLog(LOG_AM_ON_RESTART_CALLED, reason); EventLogTags.writeWmOnRestartCalled(mIdent, getComponentName().getClassName(), reason); if (!mCalled) { if (!mCalled) { throw new SuperNotCalledException( throw new SuperNotCalledException( "Activity " + mComponent.toShortString() + "Activity " + mComponent.toShortString() + Loading Loading @@ -8031,7 +8026,7 @@ public class Activity extends ContextThemeWrapper mCalled = false; mCalled = false; // mResumed is set by the instrumentation // mResumed is set by the instrumentation mInstrumentation.callActivityOnResume(this); mInstrumentation.callActivityOnResume(this); writeEventLog(LOG_AM_ON_RESUME_CALLED, reason); EventLogTags.writeWmOnResumeCalled(mIdent, getComponentName().getClassName(), reason); if (!mCalled) { if (!mCalled) { throw new SuperNotCalledException( throw new SuperNotCalledException( "Activity " + mComponent.toShortString() + "Activity " + mComponent.toShortString() + Loading Loading @@ -8070,7 +8065,8 @@ public class Activity extends ContextThemeWrapper mFragments.dispatchPause(); mFragments.dispatchPause(); mCalled = false; mCalled = false; onPause(); onPause(); writeEventLog(LOG_AM_ON_PAUSE_CALLED, "performPause"); EventLogTags.writeWmOnPausedCalled(mIdent, getComponentName().getClassName(), "performPause"); mResumed = false; mResumed = false; if (!mCalled && getApplicationInfo().targetSdkVersion if (!mCalled && getApplicationInfo().targetSdkVersion >= android.os.Build.VERSION_CODES.GINGERBREAD) { >= android.os.Build.VERSION_CODES.GINGERBREAD) { Loading Loading @@ -8110,7 +8106,7 @@ public class Activity extends ContextThemeWrapper mCalled = false; mCalled = false; mInstrumentation.callActivityOnStop(this); mInstrumentation.callActivityOnStop(this); writeEventLog(LOG_AM_ON_STOP_CALLED, reason); EventLogTags.writeWmOnStopCalled(mIdent, getComponentName().getClassName(), reason); if (!mCalled) { if (!mCalled) { throw new SuperNotCalledException( throw new SuperNotCalledException( "Activity " + mComponent.toShortString() + "Activity " + mComponent.toShortString() + Loading Loading @@ -8140,7 +8136,8 @@ public class Activity extends ContextThemeWrapper mWindow.destroy(); mWindow.destroy(); mFragments.dispatchDestroy(); mFragments.dispatchDestroy(); onDestroy(); onDestroy(); writeEventLog(LOG_AM_ON_DESTROY_CALLED, "performDestroy"); EventLogTags.writeWmOnDestroyCalled(mIdent, getComponentName().getClassName(), "performDestroy"); mFragments.doLoaderDestroy(); mFragments.doLoaderDestroy(); if (mVoiceInteractor != null) { if (mVoiceInteractor != null) { mVoiceInteractor.detachActivity(); mVoiceInteractor.detachActivity(); Loading Loading @@ -8233,7 +8230,9 @@ public class Activity extends ContextThemeWrapper frag.onActivityResult(requestCode, resultCode, data); frag.onActivityResult(requestCode, resultCode, data); } } } } writeEventLog(LOG_AM_ON_ACTIVITY_RESULT_CALLED, reason); EventLogTags.writeWmOnActivityResultCalled(mIdent, getComponentName().getClassName(), reason); } } /** /** Loading Loading @@ -8660,11 +8659,6 @@ public class Activity extends ContextThemeWrapper } } } } /** Log a lifecycle event for current user id and component class. */ private void writeEventLog(int event, String reason) { EventLog.writeEvent(event, mIdent, getComponentName().getClassName(), reason); } class HostCallbacks extends FragmentHostCallback<Activity> { class HostCallbacks extends FragmentHostCallback<Activity> { public HostCallbacks() { public HostCallbacks() { super(Activity.this /*activity*/); super(Activity.this /*activity*/); Loading core/java/android/app/EventLogTags.logtags 0 → 100644 +36 −0 Original line number Original line Diff line number Diff line # See system/core/logcat/event.logtags for a description of the format of this file. option java_package android.app # Do not change these names without updating the checkin_events setting in # google3/googledata/wireless/android/provisioning/gservices.config !! # # The activity's onPause has been called. 30021 wm_on_paused_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onResume has been called. 30022 wm_on_resume_called (Token|1|5),(Component Name|3),(Reason|3) # Attempting to stop an activity 30048 wm_stop_activity (User|1|5),(Token|1|5),(Component Name|3) # The activity's onStop has been called. 30049 wm_on_stop_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onCreate has been called. 30057 wm_on_create_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onRestart has been called. 30058 wm_on_restart_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onStart has been called. 30059 wm_on_start_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onDestroy has been called. 30060 wm_on_destroy_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onActivityResult has been called. 30062 wm_on_activity_result_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onTopResumedActivityChanged(true) has been called. 30064 wm_on_top_resumed_gained_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onTopResumedActivityChanged(false) has been called. 30065 wm_on_top_resumed_lost_called (Token|1|5),(Component Name|3),(Reason|3) # An activity been add into stopping list 30066 wm_add_to_stopping (User|1|5),(Token|1|5),(Component Name|3),(Reason|3) services/core/Android.bp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -86,6 +86,7 @@ java_library_static { ":tethering-servicescore-srcs", ":tethering-servicescore-srcs", "java/com/android/server/EventLogTags.logtags", "java/com/android/server/EventLogTags.logtags", "java/com/android/server/am/EventLogTags.logtags", "java/com/android/server/am/EventLogTags.logtags", "java/com/android/server/wm/EventLogTags.logtags", "java/com/android/server/policy/EventLogTags.logtags", "java/com/android/server/policy/EventLogTags.logtags", ], ], Loading services/core/java/com/android/server/EventLogTags.logtags +0 −21 Original line number Original line Diff line number Diff line Loading @@ -174,27 +174,6 @@ option java_package com.android.server # Disk usage stats for verifying quota correctness # Disk usage stats for verifying quota correctness 3121 pm_package_stats (manual_time|2|3),(quota_time|2|3),(manual_data|2|2),(quota_data|2|2),(manual_cache|2|2),(quota_cache|2|2) 3121 pm_package_stats (manual_time|2|3),(quota_time|2|3),(manual_data|2|2),(quota_data|2|2),(manual_cache|2|2),(quota_cache|2|2) # --------------------------- # WindowManagerService.java # --------------------------- # Out of memory for surfaces. 31000 wm_no_surface_memory (Window|3),(PID|1|5),(Operation|3) # Task created. 31001 wm_task_created (TaskId|1|5),(StackId|1|5) # Task moved to top (1) or bottom (0). 31002 wm_task_moved (TaskId|1|5),(ToTop|1),(Index|1) # Task removed with source explanation. 31003 wm_task_removed (TaskId|1|5),(Reason|3) # Stack created. 31004 wm_stack_created (StackId|1|5) # Home stack moved to top (1) or bottom (0). 31005 wm_home_stack_moved (ToTop|1) # Stack removed. 31006 wm_stack_removed (StackId|1|5) # bootanim finished: 31007 wm_boot_animation_done (time|2|3) # --------------------------- # --------------------------- # InputMethodManagerService.java # InputMethodManagerService.java # --------------------------- # --------------------------- Loading services/core/java/com/android/server/am/ActivityManagerService.java +16 −14 Original line number Original line Diff line number Diff line Loading @@ -2786,7 +2786,7 @@ public class ActivityManagerService extends IActivityManager.Stub int total = user + system + iowait + irq + softIrq + idle; int total = user + system + iowait + irq + softIrq + idle; if (total == 0) total = 1; if (total == 0) total = 1; EventLog.writeEvent(EventLogTags.CPU, EventLogTags.writeCpu( ((user + system + iowait + irq + softIrq) * 100) / total, ((user + system + iowait + irq + softIrq) * 100) / total, (user * 100) / total, (user * 100) / total, (system * 100) / total, (system * 100) / total, Loading Loading @@ -3656,7 +3656,7 @@ public class ActivityManagerService extends IActivityManager.Stub final ArrayList<ProcessMemInfo> memInfos final ArrayList<ProcessMemInfo> memInfos = doReport ? new ArrayList<ProcessMemInfo>(mProcessList.getLruSizeLocked()) = doReport ? new ArrayList<ProcessMemInfo>(mProcessList.getLruSizeLocked()) : null; : null; EventLog.writeEvent(EventLogTags.AM_LOW_MEMORY, mProcessList.getLruSizeLocked()); EventLogTags.writeAmLowMemory(mProcessList.getLruSizeLocked()); long now = SystemClock.uptimeMillis(); long now = SystemClock.uptimeMillis(); for (int i = mProcessList.mLruProcesses.size() - 1; i >= 0; i--) { for (int i = mProcessList.mLruProcesses.size() - 1; i >= 0; i--) { ProcessRecord rec = mProcessList.mLruProcesses.get(i); ProcessRecord rec = mProcessList.mLruProcesses.get(i); Loading Loading @@ -3737,8 +3737,8 @@ public class ActivityManagerService extends IActivityManager.Stub mAllowLowerMemLevel = false; mAllowLowerMemLevel = false; doLowMem = false; doLowMem = false; } } EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.userId, app.pid, app.processName, EventLogTags.writeAmProcDied(app.userId, app.pid, app.processName, app.setAdj, app.setAdj, app.setProcState); app.setProcState); if (DEBUG_CLEANUP) Slog.v(TAG_CLEANUP, if (DEBUG_CLEANUP) Slog.v(TAG_CLEANUP, "Dying app: " + app + ", pid: " + pid + ", thread: " + thread.asBinder()); "Dying app: " + app + ", pid: " + pid + ", thread: " + thread.asBinder()); handleAppDiedLocked(app, false, true); handleAppDiedLocked(app, false, true); Loading @@ -3761,7 +3761,8 @@ public class ActivityManagerService extends IActivityManager.Stub // Execute the callback if there is any. // Execute the callback if there is any. doAppDiedCallbackLocked(app); doAppDiedCallbackLocked(app); EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.userId, app.pid, app.processName); EventLogTags.writeAmProcDied(app.userId, app.pid, app.processName, app.setAdj, app.setProcState); } else if (DEBUG_PROCESSES) { } else if (DEBUG_PROCESSES) { Slog.d(TAG_PROCESSES, "Received spurious death notification for thread " Slog.d(TAG_PROCESSES, "Received spurious death notification for thread " + thread.asBinder()); + thread.asBinder()); Loading Loading @@ -4755,8 +4756,7 @@ public class ActivityManagerService extends IActivityManager.Stub if (gone) { if (gone) { Slog.w(TAG, "Process " + app + " failed to attach"); Slog.w(TAG, "Process " + app + " failed to attach"); EventLog.writeEvent(EventLogTags.AM_PROCESS_START_TIMEOUT, app.userId, EventLogTags.writeAmProcessStartTimeout(app.userId, pid, app.uid, app.processName); pid, app.uid, app.processName); mProcessList.removeProcessNameLocked(app.processName, app.uid); mProcessList.removeProcessNameLocked(app.processName, app.uid); mAtmInternal.clearHeavyWeightProcessIfEquals(app.getWindowProcessController()); mAtmInternal.clearHeavyWeightProcessIfEquals(app.getWindowProcessController()); mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid); mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid); Loading Loading @@ -4847,7 +4847,7 @@ public class ActivityManagerService extends IActivityManager.Stub if (app == null) { if (app == null) { Slog.w(TAG, "No pending application record for pid " + pid Slog.w(TAG, "No pending application record for pid " + pid + " (IApplicationThread " + thread + "); dropping process"); + " (IApplicationThread " + thread + "); dropping process"); EventLog.writeEvent(EventLogTags.AM_DROP_PROCESS, pid); EventLogTags.writeAmDropProcess(pid); if (pid > 0 && pid != MY_PID) { if (pid > 0 && pid != MY_PID) { killProcessQuiet(pid); killProcessQuiet(pid); //TODO: killProcessGroup(app.info.uid, pid); //TODO: killProcessGroup(app.info.uid, pid); Loading Loading @@ -4885,7 +4885,7 @@ public class ActivityManagerService extends IActivityManager.Stub return false; return false; } } EventLog.writeEvent(EventLogTags.AM_PROC_BOUND, app.userId, app.pid, app.processName); EventLogTags.writeAmProcBound(app.userId, app.pid, app.processName); app.curAdj = app.setAdj = app.verifiedAdj = ProcessList.INVALID_ADJ; app.curAdj = app.setAdj = app.verifiedAdj = ProcessList.INVALID_ADJ; mOomAdjuster.setAttachingSchedGroupLocked(app); mOomAdjuster.setAttachingSchedGroupLocked(app); Loading Loading @@ -7163,7 +7163,7 @@ public class ActivityManagerService extends IActivityManager.Stub + cpi.applicationInfo.packageName + "/" + cpi.applicationInfo.packageName + "/" + cpi.applicationInfo.uid + " for provider " + cpi.applicationInfo.uid + " for provider " + name + ": launching app became null"); + name + ": launching app became null"); EventLog.writeEvent(EventLogTags.AM_PROVIDER_LOST_PROCESS, EventLogTags.writeAmProviderLostProcess( UserHandle.getUserId(cpi.applicationInfo.uid), UserHandle.getUserId(cpi.applicationInfo.uid), cpi.applicationInfo.packageName, cpi.applicationInfo.packageName, cpi.applicationInfo.uid, name); cpi.applicationInfo.uid, name); Loading Loading @@ -9156,7 +9156,8 @@ public class ActivityManagerService extends IActivityManager.Stub t.traceEnd(); // KillProcesses t.traceEnd(); // KillProcesses Slog.i(TAG, "System now ready"); Slog.i(TAG, "System now ready"); EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_AMS_READY, SystemClock.uptimeMillis()); EventLogTags.writeBootProgressAmsReady(SystemClock.uptimeMillis()); t.traceBegin("updateTopComponentForFactoryTest"); t.traceBegin("updateTopComponentForFactoryTest"); mAtmInternal.updateTopComponentForFactoryTest(); mAtmInternal.updateTopComponentForFactoryTest(); Loading Loading @@ -9410,7 +9411,8 @@ public class ActivityManagerService extends IActivityManager.Stub */ */ void handleApplicationCrashInner(String eventType, ProcessRecord r, String processName, void handleApplicationCrashInner(String eventType, ProcessRecord r, String processName, ApplicationErrorReport.CrashInfo crashInfo) { ApplicationErrorReport.CrashInfo crashInfo) { EventLog.writeEvent(EventLogTags.AM_CRASH, Binder.getCallingPid(), EventLogTags.writeAmCrash(Binder.getCallingPid(), UserHandle.getUserId(Binder.getCallingUid()), processName, UserHandle.getUserId(Binder.getCallingUid()), processName, r == null ? -1 : r.info.flags, r == null ? -1 : r.info.flags, crashInfo.exceptionClassName, crashInfo.exceptionClassName, Loading Loading @@ -9613,7 +9615,7 @@ public class ActivityManagerService extends IActivityManager.Stub final String processName = app == null ? "system_server" final String processName = app == null ? "system_server" : (r == null ? "unknown" : r.processName); : (r == null ? "unknown" : r.processName); EventLog.writeEvent(EventLogTags.AM_WTF, UserHandle.getUserId(callingUid), callingPid, EventLogTags.writeAmWtf(UserHandle.getUserId(callingUid), callingPid, processName, r == null ? -1 : r.info.flags, tag, crashInfo.exceptionMessage); processName, r == null ? -1 : r.info.flags, tag, crashInfo.exceptionMessage); StatsLog.write(StatsLog.WTF_OCCURRED, callingUid, tag, processName, StatsLog.write(StatsLog.WTF_OCCURRED, callingUid, tag, processName, Loading Loading
core/java/android/app/Activity.java +20 −26 Original line number Original line Diff line number Diff line Loading @@ -769,17 +769,6 @@ public class Activity extends ContextThemeWrapper private static final String KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME = "com.android.systemui"; private static final String KEYBOARD_SHORTCUTS_RECEIVER_PKG_NAME = "com.android.systemui"; private static final int LOG_AM_ON_CREATE_CALLED = 30057; private static final int LOG_AM_ON_START_CALLED = 30059; private static final int LOG_AM_ON_RESUME_CALLED = 30022; private static final int LOG_AM_ON_PAUSE_CALLED = 30021; private static final int LOG_AM_ON_STOP_CALLED = 30049; private static final int LOG_AM_ON_RESTART_CALLED = 30058; private static final int LOG_AM_ON_DESTROY_CALLED = 30060; private static final int LOG_AM_ON_ACTIVITY_RESULT_CALLED = 30062; private static final int LOG_AM_ON_TOP_RESUMED_GAINED_CALLED = 30064; private static final int LOG_AM_ON_TOP_RESUMED_LOST_CALLED = 30065; private static class ManagedDialog { private static class ManagedDialog { Dialog mDialog; Dialog mDialog; Bundle mArgs; Bundle mArgs; Loading Loading @@ -1863,8 +1852,13 @@ public class Activity extends ContextThemeWrapper final void performTopResumedActivityChanged(boolean isTopResumedActivity, String reason) { final void performTopResumedActivityChanged(boolean isTopResumedActivity, String reason) { onTopResumedActivityChanged(isTopResumedActivity); onTopResumedActivityChanged(isTopResumedActivity); writeEventLog(isTopResumedActivity if (isTopResumedActivity) { ? LOG_AM_ON_TOP_RESUMED_GAINED_CALLED : LOG_AM_ON_TOP_RESUMED_LOST_CALLED, reason); EventLogTags.writeWmOnTopResumedGainedCalled(mIdent, getComponentName().getClassName(), reason); } else { EventLogTags.writeWmOnTopResumedLostCalled(mIdent, getComponentName().getClassName(), reason); } } } void setVoiceInteractor(IVoiceInteractor voiceInteractor) { void setVoiceInteractor(IVoiceInteractor voiceInteractor) { Loading Loading @@ -7898,7 +7892,8 @@ public class Activity extends ContextThemeWrapper } else { } else { onCreate(icicle); onCreate(icicle); } } writeEventLog(LOG_AM_ON_CREATE_CALLED, "performCreate"); EventLogTags.writeWmOnCreateCalled(mIdent, getComponentName().getClassName(), "performCreate"); mActivityTransitionState.readState(icicle); mActivityTransitionState.readState(icicle); mVisibleFromClient = !mWindow.getWindowStyle().getBoolean( mVisibleFromClient = !mWindow.getWindowStyle().getBoolean( Loading @@ -7920,7 +7915,7 @@ public class Activity extends ContextThemeWrapper mCalled = false; mCalled = false; mFragments.execPendingActions(); mFragments.execPendingActions(); mInstrumentation.callActivityOnStart(this); mInstrumentation.callActivityOnStart(this); writeEventLog(LOG_AM_ON_START_CALLED, reason); EventLogTags.writeWmOnStartCalled(mIdent, getComponentName().getClassName(), reason); if (!mCalled) { if (!mCalled) { throw new SuperNotCalledException( throw new SuperNotCalledException( Loading Loading @@ -7998,7 +7993,7 @@ public class Activity extends ContextThemeWrapper mCalled = false; mCalled = false; mInstrumentation.callActivityOnRestart(this); mInstrumentation.callActivityOnRestart(this); writeEventLog(LOG_AM_ON_RESTART_CALLED, reason); EventLogTags.writeWmOnRestartCalled(mIdent, getComponentName().getClassName(), reason); if (!mCalled) { if (!mCalled) { throw new SuperNotCalledException( throw new SuperNotCalledException( "Activity " + mComponent.toShortString() + "Activity " + mComponent.toShortString() + Loading Loading @@ -8031,7 +8026,7 @@ public class Activity extends ContextThemeWrapper mCalled = false; mCalled = false; // mResumed is set by the instrumentation // mResumed is set by the instrumentation mInstrumentation.callActivityOnResume(this); mInstrumentation.callActivityOnResume(this); writeEventLog(LOG_AM_ON_RESUME_CALLED, reason); EventLogTags.writeWmOnResumeCalled(mIdent, getComponentName().getClassName(), reason); if (!mCalled) { if (!mCalled) { throw new SuperNotCalledException( throw new SuperNotCalledException( "Activity " + mComponent.toShortString() + "Activity " + mComponent.toShortString() + Loading Loading @@ -8070,7 +8065,8 @@ public class Activity extends ContextThemeWrapper mFragments.dispatchPause(); mFragments.dispatchPause(); mCalled = false; mCalled = false; onPause(); onPause(); writeEventLog(LOG_AM_ON_PAUSE_CALLED, "performPause"); EventLogTags.writeWmOnPausedCalled(mIdent, getComponentName().getClassName(), "performPause"); mResumed = false; mResumed = false; if (!mCalled && getApplicationInfo().targetSdkVersion if (!mCalled && getApplicationInfo().targetSdkVersion >= android.os.Build.VERSION_CODES.GINGERBREAD) { >= android.os.Build.VERSION_CODES.GINGERBREAD) { Loading Loading @@ -8110,7 +8106,7 @@ public class Activity extends ContextThemeWrapper mCalled = false; mCalled = false; mInstrumentation.callActivityOnStop(this); mInstrumentation.callActivityOnStop(this); writeEventLog(LOG_AM_ON_STOP_CALLED, reason); EventLogTags.writeWmOnStopCalled(mIdent, getComponentName().getClassName(), reason); if (!mCalled) { if (!mCalled) { throw new SuperNotCalledException( throw new SuperNotCalledException( "Activity " + mComponent.toShortString() + "Activity " + mComponent.toShortString() + Loading Loading @@ -8140,7 +8136,8 @@ public class Activity extends ContextThemeWrapper mWindow.destroy(); mWindow.destroy(); mFragments.dispatchDestroy(); mFragments.dispatchDestroy(); onDestroy(); onDestroy(); writeEventLog(LOG_AM_ON_DESTROY_CALLED, "performDestroy"); EventLogTags.writeWmOnDestroyCalled(mIdent, getComponentName().getClassName(), "performDestroy"); mFragments.doLoaderDestroy(); mFragments.doLoaderDestroy(); if (mVoiceInteractor != null) { if (mVoiceInteractor != null) { mVoiceInteractor.detachActivity(); mVoiceInteractor.detachActivity(); Loading Loading @@ -8233,7 +8230,9 @@ public class Activity extends ContextThemeWrapper frag.onActivityResult(requestCode, resultCode, data); frag.onActivityResult(requestCode, resultCode, data); } } } } writeEventLog(LOG_AM_ON_ACTIVITY_RESULT_CALLED, reason); EventLogTags.writeWmOnActivityResultCalled(mIdent, getComponentName().getClassName(), reason); } } /** /** Loading Loading @@ -8660,11 +8659,6 @@ public class Activity extends ContextThemeWrapper } } } } /** Log a lifecycle event for current user id and component class. */ private void writeEventLog(int event, String reason) { EventLog.writeEvent(event, mIdent, getComponentName().getClassName(), reason); } class HostCallbacks extends FragmentHostCallback<Activity> { class HostCallbacks extends FragmentHostCallback<Activity> { public HostCallbacks() { public HostCallbacks() { super(Activity.this /*activity*/); super(Activity.this /*activity*/); Loading
core/java/android/app/EventLogTags.logtags 0 → 100644 +36 −0 Original line number Original line Diff line number Diff line # See system/core/logcat/event.logtags for a description of the format of this file. option java_package android.app # Do not change these names without updating the checkin_events setting in # google3/googledata/wireless/android/provisioning/gservices.config !! # # The activity's onPause has been called. 30021 wm_on_paused_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onResume has been called. 30022 wm_on_resume_called (Token|1|5),(Component Name|3),(Reason|3) # Attempting to stop an activity 30048 wm_stop_activity (User|1|5),(Token|1|5),(Component Name|3) # The activity's onStop has been called. 30049 wm_on_stop_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onCreate has been called. 30057 wm_on_create_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onRestart has been called. 30058 wm_on_restart_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onStart has been called. 30059 wm_on_start_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onDestroy has been called. 30060 wm_on_destroy_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onActivityResult has been called. 30062 wm_on_activity_result_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onTopResumedActivityChanged(true) has been called. 30064 wm_on_top_resumed_gained_called (Token|1|5),(Component Name|3),(Reason|3) # The activity's onTopResumedActivityChanged(false) has been called. 30065 wm_on_top_resumed_lost_called (Token|1|5),(Component Name|3),(Reason|3) # An activity been add into stopping list 30066 wm_add_to_stopping (User|1|5),(Token|1|5),(Component Name|3),(Reason|3)
services/core/Android.bp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -86,6 +86,7 @@ java_library_static { ":tethering-servicescore-srcs", ":tethering-servicescore-srcs", "java/com/android/server/EventLogTags.logtags", "java/com/android/server/EventLogTags.logtags", "java/com/android/server/am/EventLogTags.logtags", "java/com/android/server/am/EventLogTags.logtags", "java/com/android/server/wm/EventLogTags.logtags", "java/com/android/server/policy/EventLogTags.logtags", "java/com/android/server/policy/EventLogTags.logtags", ], ], Loading
services/core/java/com/android/server/EventLogTags.logtags +0 −21 Original line number Original line Diff line number Diff line Loading @@ -174,27 +174,6 @@ option java_package com.android.server # Disk usage stats for verifying quota correctness # Disk usage stats for verifying quota correctness 3121 pm_package_stats (manual_time|2|3),(quota_time|2|3),(manual_data|2|2),(quota_data|2|2),(manual_cache|2|2),(quota_cache|2|2) 3121 pm_package_stats (manual_time|2|3),(quota_time|2|3),(manual_data|2|2),(quota_data|2|2),(manual_cache|2|2),(quota_cache|2|2) # --------------------------- # WindowManagerService.java # --------------------------- # Out of memory for surfaces. 31000 wm_no_surface_memory (Window|3),(PID|1|5),(Operation|3) # Task created. 31001 wm_task_created (TaskId|1|5),(StackId|1|5) # Task moved to top (1) or bottom (0). 31002 wm_task_moved (TaskId|1|5),(ToTop|1),(Index|1) # Task removed with source explanation. 31003 wm_task_removed (TaskId|1|5),(Reason|3) # Stack created. 31004 wm_stack_created (StackId|1|5) # Home stack moved to top (1) or bottom (0). 31005 wm_home_stack_moved (ToTop|1) # Stack removed. 31006 wm_stack_removed (StackId|1|5) # bootanim finished: 31007 wm_boot_animation_done (time|2|3) # --------------------------- # --------------------------- # InputMethodManagerService.java # InputMethodManagerService.java # --------------------------- # --------------------------- Loading
services/core/java/com/android/server/am/ActivityManagerService.java +16 −14 Original line number Original line Diff line number Diff line Loading @@ -2786,7 +2786,7 @@ public class ActivityManagerService extends IActivityManager.Stub int total = user + system + iowait + irq + softIrq + idle; int total = user + system + iowait + irq + softIrq + idle; if (total == 0) total = 1; if (total == 0) total = 1; EventLog.writeEvent(EventLogTags.CPU, EventLogTags.writeCpu( ((user + system + iowait + irq + softIrq) * 100) / total, ((user + system + iowait + irq + softIrq) * 100) / total, (user * 100) / total, (user * 100) / total, (system * 100) / total, (system * 100) / total, Loading Loading @@ -3656,7 +3656,7 @@ public class ActivityManagerService extends IActivityManager.Stub final ArrayList<ProcessMemInfo> memInfos final ArrayList<ProcessMemInfo> memInfos = doReport ? new ArrayList<ProcessMemInfo>(mProcessList.getLruSizeLocked()) = doReport ? new ArrayList<ProcessMemInfo>(mProcessList.getLruSizeLocked()) : null; : null; EventLog.writeEvent(EventLogTags.AM_LOW_MEMORY, mProcessList.getLruSizeLocked()); EventLogTags.writeAmLowMemory(mProcessList.getLruSizeLocked()); long now = SystemClock.uptimeMillis(); long now = SystemClock.uptimeMillis(); for (int i = mProcessList.mLruProcesses.size() - 1; i >= 0; i--) { for (int i = mProcessList.mLruProcesses.size() - 1; i >= 0; i--) { ProcessRecord rec = mProcessList.mLruProcesses.get(i); ProcessRecord rec = mProcessList.mLruProcesses.get(i); Loading Loading @@ -3737,8 +3737,8 @@ public class ActivityManagerService extends IActivityManager.Stub mAllowLowerMemLevel = false; mAllowLowerMemLevel = false; doLowMem = false; doLowMem = false; } } EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.userId, app.pid, app.processName, EventLogTags.writeAmProcDied(app.userId, app.pid, app.processName, app.setAdj, app.setAdj, app.setProcState); app.setProcState); if (DEBUG_CLEANUP) Slog.v(TAG_CLEANUP, if (DEBUG_CLEANUP) Slog.v(TAG_CLEANUP, "Dying app: " + app + ", pid: " + pid + ", thread: " + thread.asBinder()); "Dying app: " + app + ", pid: " + pid + ", thread: " + thread.asBinder()); handleAppDiedLocked(app, false, true); handleAppDiedLocked(app, false, true); Loading @@ -3761,7 +3761,8 @@ public class ActivityManagerService extends IActivityManager.Stub // Execute the callback if there is any. // Execute the callback if there is any. doAppDiedCallbackLocked(app); doAppDiedCallbackLocked(app); EventLog.writeEvent(EventLogTags.AM_PROC_DIED, app.userId, app.pid, app.processName); EventLogTags.writeAmProcDied(app.userId, app.pid, app.processName, app.setAdj, app.setProcState); } else if (DEBUG_PROCESSES) { } else if (DEBUG_PROCESSES) { Slog.d(TAG_PROCESSES, "Received spurious death notification for thread " Slog.d(TAG_PROCESSES, "Received spurious death notification for thread " + thread.asBinder()); + thread.asBinder()); Loading Loading @@ -4755,8 +4756,7 @@ public class ActivityManagerService extends IActivityManager.Stub if (gone) { if (gone) { Slog.w(TAG, "Process " + app + " failed to attach"); Slog.w(TAG, "Process " + app + " failed to attach"); EventLog.writeEvent(EventLogTags.AM_PROCESS_START_TIMEOUT, app.userId, EventLogTags.writeAmProcessStartTimeout(app.userId, pid, app.uid, app.processName); pid, app.uid, app.processName); mProcessList.removeProcessNameLocked(app.processName, app.uid); mProcessList.removeProcessNameLocked(app.processName, app.uid); mAtmInternal.clearHeavyWeightProcessIfEquals(app.getWindowProcessController()); mAtmInternal.clearHeavyWeightProcessIfEquals(app.getWindowProcessController()); mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid); mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid); Loading Loading @@ -4847,7 +4847,7 @@ public class ActivityManagerService extends IActivityManager.Stub if (app == null) { if (app == null) { Slog.w(TAG, "No pending application record for pid " + pid Slog.w(TAG, "No pending application record for pid " + pid + " (IApplicationThread " + thread + "); dropping process"); + " (IApplicationThread " + thread + "); dropping process"); EventLog.writeEvent(EventLogTags.AM_DROP_PROCESS, pid); EventLogTags.writeAmDropProcess(pid); if (pid > 0 && pid != MY_PID) { if (pid > 0 && pid != MY_PID) { killProcessQuiet(pid); killProcessQuiet(pid); //TODO: killProcessGroup(app.info.uid, pid); //TODO: killProcessGroup(app.info.uid, pid); Loading Loading @@ -4885,7 +4885,7 @@ public class ActivityManagerService extends IActivityManager.Stub return false; return false; } } EventLog.writeEvent(EventLogTags.AM_PROC_BOUND, app.userId, app.pid, app.processName); EventLogTags.writeAmProcBound(app.userId, app.pid, app.processName); app.curAdj = app.setAdj = app.verifiedAdj = ProcessList.INVALID_ADJ; app.curAdj = app.setAdj = app.verifiedAdj = ProcessList.INVALID_ADJ; mOomAdjuster.setAttachingSchedGroupLocked(app); mOomAdjuster.setAttachingSchedGroupLocked(app); Loading Loading @@ -7163,7 +7163,7 @@ public class ActivityManagerService extends IActivityManager.Stub + cpi.applicationInfo.packageName + "/" + cpi.applicationInfo.packageName + "/" + cpi.applicationInfo.uid + " for provider " + cpi.applicationInfo.uid + " for provider " + name + ": launching app became null"); + name + ": launching app became null"); EventLog.writeEvent(EventLogTags.AM_PROVIDER_LOST_PROCESS, EventLogTags.writeAmProviderLostProcess( UserHandle.getUserId(cpi.applicationInfo.uid), UserHandle.getUserId(cpi.applicationInfo.uid), cpi.applicationInfo.packageName, cpi.applicationInfo.packageName, cpi.applicationInfo.uid, name); cpi.applicationInfo.uid, name); Loading Loading @@ -9156,7 +9156,8 @@ public class ActivityManagerService extends IActivityManager.Stub t.traceEnd(); // KillProcesses t.traceEnd(); // KillProcesses Slog.i(TAG, "System now ready"); Slog.i(TAG, "System now ready"); EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_AMS_READY, SystemClock.uptimeMillis()); EventLogTags.writeBootProgressAmsReady(SystemClock.uptimeMillis()); t.traceBegin("updateTopComponentForFactoryTest"); t.traceBegin("updateTopComponentForFactoryTest"); mAtmInternal.updateTopComponentForFactoryTest(); mAtmInternal.updateTopComponentForFactoryTest(); Loading Loading @@ -9410,7 +9411,8 @@ public class ActivityManagerService extends IActivityManager.Stub */ */ void handleApplicationCrashInner(String eventType, ProcessRecord r, String processName, void handleApplicationCrashInner(String eventType, ProcessRecord r, String processName, ApplicationErrorReport.CrashInfo crashInfo) { ApplicationErrorReport.CrashInfo crashInfo) { EventLog.writeEvent(EventLogTags.AM_CRASH, Binder.getCallingPid(), EventLogTags.writeAmCrash(Binder.getCallingPid(), UserHandle.getUserId(Binder.getCallingUid()), processName, UserHandle.getUserId(Binder.getCallingUid()), processName, r == null ? -1 : r.info.flags, r == null ? -1 : r.info.flags, crashInfo.exceptionClassName, crashInfo.exceptionClassName, Loading Loading @@ -9613,7 +9615,7 @@ public class ActivityManagerService extends IActivityManager.Stub final String processName = app == null ? "system_server" final String processName = app == null ? "system_server" : (r == null ? "unknown" : r.processName); : (r == null ? "unknown" : r.processName); EventLog.writeEvent(EventLogTags.AM_WTF, UserHandle.getUserId(callingUid), callingPid, EventLogTags.writeAmWtf(UserHandle.getUserId(callingUid), callingPid, processName, r == null ? -1 : r.info.flags, tag, crashInfo.exceptionMessage); processName, r == null ? -1 : r.info.flags, tag, crashInfo.exceptionMessage); StatsLog.write(StatsLog.WTF_OCCURRED, callingUid, tag, processName, StatsLog.write(StatsLog.WTF_OCCURRED, callingUid, tag, processName, Loading