Merge "RESTRICT AUTOMERGE: Manually merge 885aca1bba to aosp-master"
This commit is contained in:
@@ -161,6 +161,7 @@ message Atom {
|
|||||||
BluetoothBondStateChanged bluetooth_bond_state_changed = 165;
|
BluetoothBondStateChanged bluetooth_bond_state_changed = 165;
|
||||||
BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = 166;
|
BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = 166;
|
||||||
BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 167;
|
BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 167;
|
||||||
|
ProcessStartTime process_start_time = 169;
|
||||||
BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
|
BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2968,3 +2969,59 @@ message SeOmapiReported {
|
|||||||
|
|
||||||
optional string package_name = 3;
|
optional string package_name = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Logs number of milliseconds it takes to start a process.
|
||||||
|
* The definition of app process start time is from the app launch time to
|
||||||
|
* the time that Zygote finished forking the app process and loaded the
|
||||||
|
* application package's java classes.
|
||||||
|
|
||||||
|
* This metric is different from AppStartOccurred which is for foreground
|
||||||
|
* activity only.
|
||||||
|
|
||||||
|
* ProcessStartTime can report all processes (both foreground and background)
|
||||||
|
* start time.
|
||||||
|
*
|
||||||
|
* Logged from:
|
||||||
|
* frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
|
||||||
|
*/
|
||||||
|
message ProcessStartTime {
|
||||||
|
// The uid of the ProcessRecord.
|
||||||
|
optional int32 uid = 1 [(is_uid) = true];
|
||||||
|
|
||||||
|
// The process pid.
|
||||||
|
optional int32 pid = 2;
|
||||||
|
|
||||||
|
// The process name.
|
||||||
|
// Usually package name, "system" for system server.
|
||||||
|
// Provided by ActivityManagerService.
|
||||||
|
optional string process_name = 3;
|
||||||
|
|
||||||
|
enum StartType {
|
||||||
|
UNKNOWN = 0;
|
||||||
|
WARM = 1;
|
||||||
|
HOT = 2;
|
||||||
|
COLD = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The start type.
|
||||||
|
optional StartType type = 4;
|
||||||
|
|
||||||
|
// The elapsed realtime at the start of the process.
|
||||||
|
optional int64 process_start_time_millis = 5;
|
||||||
|
|
||||||
|
// Number of milliseconds it takes to reach bind application.
|
||||||
|
optional int32 bind_application_delay_millis = 6;
|
||||||
|
|
||||||
|
// Number of milliseconds it takes to finish start of the process.
|
||||||
|
optional int32 process_start_delay_millis = 7;
|
||||||
|
|
||||||
|
// hostingType field in ProcessRecord, the component type such as "activity",
|
||||||
|
// "service", "content provider", "broadcast" or other strings.
|
||||||
|
optional string hosting_type = 8;
|
||||||
|
|
||||||
|
// hostingNameStr field in ProcessRecord. The component class name that runs
|
||||||
|
// in this process.
|
||||||
|
optional string hosting_name = 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7436,6 +7436,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
|||||||
// next app record if we are emulating process with anonymous threads.
|
// next app record if we are emulating process with anonymous threads.
|
||||||
ProcessRecord app;
|
ProcessRecord app;
|
||||||
long startTime = SystemClock.uptimeMillis();
|
long startTime = SystemClock.uptimeMillis();
|
||||||
|
long bindApplicationTimeMillis;
|
||||||
if (pid != MY_PID && pid >= 0) {
|
if (pid != MY_PID && pid >= 0) {
|
||||||
synchronized (mPidsSelfLocked) {
|
synchronized (mPidsSelfLocked) {
|
||||||
app = mPidsSelfLocked.get(pid);
|
app = mPidsSelfLocked.get(pid);
|
||||||
@@ -7666,6 +7667,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkTime(startTime, "attachApplicationLocked: immediately before bindApplication");
|
checkTime(startTime, "attachApplicationLocked: immediately before bindApplication");
|
||||||
|
bindApplicationTimeMillis = SystemClock.elapsedRealtime();
|
||||||
mStackSupervisor.getActivityMetricsLogger().notifyBindApplication(app);
|
mStackSupervisor.getActivityMetricsLogger().notifyBindApplication(app);
|
||||||
if (app.isolatedEntryPoint != null) {
|
if (app.isolatedEntryPoint != null) {
|
||||||
// This is an isolated process which should just call an entry point instead of
|
// This is an isolated process which should just call an entry point instead of
|
||||||
@@ -7784,6 +7786,18 @@ public class ActivityManagerService extends IActivityManager.Stub
|
|||||||
checkTime(startTime, "attachApplicationLocked: after updateOomAdjLocked");
|
checkTime(startTime, "attachApplicationLocked: after updateOomAdjLocked");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StatsLog.write(
|
||||||
|
StatsLog.PROCESS_START_TIME,
|
||||||
|
app.info.uid,
|
||||||
|
app.pid,
|
||||||
|
app.info.packageName,
|
||||||
|
StatsLog.PROCESS_START_TIME__TYPE__COLD,
|
||||||
|
app.startTime,
|
||||||
|
(int) (bindApplicationTimeMillis - app.startTime),
|
||||||
|
(int) (SystemClock.elapsedRealtime() - app.startTime),
|
||||||
|
app.hostingType,
|
||||||
|
(app.hostingNameStr != null ? app.hostingNameStr : ""));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user