Loading cmds/statsd/src/atoms.proto +29 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ message Atom { ActivityForegroundStateChanged activity_foreground_state_changed = 42; IsolatedUidChanged isolated_uid_changed = 43; PacketWakeupOccurred packet_wakeup_occurred = 44; DropboxErrorChanged dropbox_error_changed = 45; // TODO: Reorder the numbering so that the most frequent occur events occur in the first 15. } Loading Loading @@ -715,6 +716,34 @@ message ActivityForegroundStateChanged { optional Activity activity = 4; } /** * Logs when an error is written to dropbox. * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message DropboxErrorChanged { // The uid if available. -1 means not available. optional int32 uid = 1; // Tag used when recording this error to dropbox. Contains data_ or system_ prefix. optional string tag = 2; // The name of the process. optional string process_name = 3; // The pid if available. -1 means not available. optional int32 pid = 4; // 1 indicates is instant app. -1 indicates Not applicable. optional int32 is_instant_app = 5; // The activity name if available. optional string activity_name = 6; // 1 indicates in foreground. -1 indicates not available. optional int32 is_foreground = 7; } /** * Pulls bytes transferred via wifi (Sum of foreground and background usage). * Loading services/core/java/com/android/server/am/ActivityManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -14578,6 +14578,18 @@ public class ActivityManagerService extends IActivityManager.Stub final String dropboxTag = processClass(process) + "_" + eventType; if (dbox == null || !dbox.isTagEnabled(dropboxTag)) return; // Log to StatsLog before the rate-limiting. // The logging below is adapated from appendDropboxProcessHeaders. StatsLog.write(StatsLog.DROPBOX_ERROR_CHANGED, process != null ? process.uid : -1, dropboxTag, processName, process != null ? process.pid : -1, (process != null && process.info != null) ? (process.info.isInstantApp() ? 1 : 0) : -1, activity != null ? activity.shortComponentName : null, process != null ? (process.isInterestingToUserLocked() ? 1 : 0) : -1); // Rate-limit how often we're willing to do the heavy lifting below to // collect and record logs; currently 5 logs per 10 second period. final long now = SystemClock.elapsedRealtime(); Loading
cmds/statsd/src/atoms.proto +29 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ message Atom { ActivityForegroundStateChanged activity_foreground_state_changed = 42; IsolatedUidChanged isolated_uid_changed = 43; PacketWakeupOccurred packet_wakeup_occurred = 44; DropboxErrorChanged dropbox_error_changed = 45; // TODO: Reorder the numbering so that the most frequent occur events occur in the first 15. } Loading Loading @@ -715,6 +716,34 @@ message ActivityForegroundStateChanged { optional Activity activity = 4; } /** * Logs when an error is written to dropbox. * Logged from: * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java */ message DropboxErrorChanged { // The uid if available. -1 means not available. optional int32 uid = 1; // Tag used when recording this error to dropbox. Contains data_ or system_ prefix. optional string tag = 2; // The name of the process. optional string process_name = 3; // The pid if available. -1 means not available. optional int32 pid = 4; // 1 indicates is instant app. -1 indicates Not applicable. optional int32 is_instant_app = 5; // The activity name if available. optional string activity_name = 6; // 1 indicates in foreground. -1 indicates not available. optional int32 is_foreground = 7; } /** * Pulls bytes transferred via wifi (Sum of foreground and background usage). * Loading
services/core/java/com/android/server/am/ActivityManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -14578,6 +14578,18 @@ public class ActivityManagerService extends IActivityManager.Stub final String dropboxTag = processClass(process) + "_" + eventType; if (dbox == null || !dbox.isTagEnabled(dropboxTag)) return; // Log to StatsLog before the rate-limiting. // The logging below is adapated from appendDropboxProcessHeaders. StatsLog.write(StatsLog.DROPBOX_ERROR_CHANGED, process != null ? process.uid : -1, dropboxTag, processName, process != null ? process.pid : -1, (process != null && process.info != null) ? (process.info.isInstantApp() ? 1 : 0) : -1, activity != null ? activity.shortComponentName : null, process != null ? (process.isInterestingToUserLocked() ? 1 : 0) : -1); // Rate-limit how often we're willing to do the heavy lifting below to // collect and record logs; currently 5 logs per 10 second period. final long now = SystemClock.elapsedRealtime();