Cleaning up duplicate proto for ProcessStartTime am: 83327c47f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20111318 Change-Id: I6c1df0b50306dbf376655fa1315153711393781a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1,92 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
syntax = "proto2";
|
||||
package android.os;
|
||||
|
||||
option java_multiple_files = true;
|
||||
|
||||
// This message is used for statsd logging and should be kept in sync with
|
||||
// frameworks/proto_logging/stats/atoms.proto
|
||||
/**
|
||||
* Logs information about process 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;
|
||||
|
||||
// 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;
|
||||
|
||||
// Broadcast action name.
|
||||
optional string broadcast_action_name = 10;
|
||||
|
||||
enum HostingTypeId {
|
||||
HOSTING_TYPE_UNKNOWN = 0;
|
||||
HOSTING_TYPE_ACTIVITY = 1;
|
||||
HOSTING_TYPE_ADDED_APPLICATION = 2;
|
||||
HOSTING_TYPE_BACKUP = 3;
|
||||
HOSTING_TYPE_BROADCAST = 4;
|
||||
HOSTING_TYPE_CONTENT_PROVIDER = 5;
|
||||
HOSTING_TYPE_LINK_FAIL = 6;
|
||||
HOSTING_TYPE_ON_HOLD = 7;
|
||||
HOSTING_TYPE_NEXT_ACTIVITY = 8;
|
||||
HOSTING_TYPE_NEXT_TOP_ACTIVITY = 9;
|
||||
HOSTING_TYPE_RESTART = 10;
|
||||
HOSTING_TYPE_SERVICE = 11;
|
||||
HOSTING_TYPE_SYSTEM = 12;
|
||||
HOSTING_TYPE_TOP_ACTIVITY = 13;
|
||||
HOSTING_TYPE_EMPTY = 14;
|
||||
}
|
||||
|
||||
optional HostingTypeId hosting_type_id = 11;
|
||||
}
|
||||
|
||||
@@ -16,12 +16,27 @@
|
||||
|
||||
package com.android.server.am;
|
||||
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_ACTIVITY;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_ADDED_APPLICATION;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_BACKUP;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_BROADCAST;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_CONTENT_PROVIDER;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_EMPTY;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_LINK_FAIL;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_NEXT_ACTIVITY;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_NEXT_TOP_ACTIVITY;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_ON_HOLD;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_RESTART;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_SERVICE;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_SYSTEM;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_TOP_ACTIVITY;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__TRIGGER_TYPE__TRIGGER_TYPE_ALARM;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__TRIGGER_TYPE__TRIGGER_TYPE_UNKNOWN;
|
||||
import static com.android.internal.util.FrameworkStatsLog.PROCESS_START_TIME__TYPE__UNKNOWN;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.content.ComponentName;
|
||||
import android.os.ProcessStartTime;
|
||||
|
||||
import com.android.internal.util.FrameworkStatsLog;
|
||||
|
||||
/**
|
||||
* This class describes various information required to start a process.
|
||||
@@ -252,35 +267,35 @@ public final class HostingRecord {
|
||||
public static int getHostingTypeIdStatsd(@NonNull String hostingType) {
|
||||
switch(hostingType) {
|
||||
case HOSTING_TYPE_ACTIVITY:
|
||||
return ProcessStartTime.HOSTING_TYPE_ACTIVITY;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_ACTIVITY;
|
||||
case HOSTING_TYPE_ADDED_APPLICATION:
|
||||
return ProcessStartTime.HOSTING_TYPE_ADDED_APPLICATION;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_ADDED_APPLICATION;
|
||||
case HOSTING_TYPE_BACKUP:
|
||||
return ProcessStartTime.HOSTING_TYPE_BACKUP;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_BACKUP;
|
||||
case HOSTING_TYPE_BROADCAST:
|
||||
return ProcessStartTime.HOSTING_TYPE_BROADCAST;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_BROADCAST;
|
||||
case HOSTING_TYPE_CONTENT_PROVIDER:
|
||||
return ProcessStartTime.HOSTING_TYPE_CONTENT_PROVIDER;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_CONTENT_PROVIDER;
|
||||
case HOSTING_TYPE_LINK_FAIL:
|
||||
return ProcessStartTime.HOSTING_TYPE_LINK_FAIL;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_LINK_FAIL;
|
||||
case HOSTING_TYPE_ON_HOLD:
|
||||
return ProcessStartTime.HOSTING_TYPE_ON_HOLD;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_ON_HOLD;
|
||||
case HOSTING_TYPE_NEXT_ACTIVITY:
|
||||
return ProcessStartTime.HOSTING_TYPE_NEXT_ACTIVITY;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_NEXT_ACTIVITY;
|
||||
case HOSTING_TYPE_NEXT_TOP_ACTIVITY:
|
||||
return ProcessStartTime.HOSTING_TYPE_NEXT_TOP_ACTIVITY;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_NEXT_TOP_ACTIVITY;
|
||||
case HOSTING_TYPE_RESTART:
|
||||
return ProcessStartTime.HOSTING_TYPE_RESTART;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_RESTART;
|
||||
case HOSTING_TYPE_SERVICE:
|
||||
return ProcessStartTime.HOSTING_TYPE_SERVICE;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_SERVICE;
|
||||
case HOSTING_TYPE_SYSTEM:
|
||||
return ProcessStartTime.HOSTING_TYPE_SYSTEM;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_SYSTEM;
|
||||
case HOSTING_TYPE_TOP_ACTIVITY:
|
||||
return ProcessStartTime.HOSTING_TYPE_TOP_ACTIVITY;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_TOP_ACTIVITY;
|
||||
case HOSTING_TYPE_EMPTY:
|
||||
return ProcessStartTime.HOSTING_TYPE_EMPTY;
|
||||
return PROCESS_START_TIME__HOSTING_TYPE_ID__HOSTING_TYPE_EMPTY;
|
||||
default:
|
||||
return ProcessStartTime.HOSTING_TYPE_UNKNOWN;
|
||||
return PROCESS_START_TIME__TYPE__UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,9 +307,9 @@ public final class HostingRecord {
|
||||
public static int getTriggerTypeForStatsd(@NonNull String triggerType) {
|
||||
switch(triggerType) {
|
||||
case TRIGGER_TYPE_ALARM:
|
||||
return FrameworkStatsLog.PROCESS_START_TIME__TRIGGER_TYPE__TRIGGER_TYPE_ALARM;
|
||||
return PROCESS_START_TIME__TRIGGER_TYPE__TRIGGER_TYPE_ALARM;
|
||||
default:
|
||||
return FrameworkStatsLog.PROCESS_START_TIME__TRIGGER_TYPE__TRIGGER_TYPE_UNKNOWN;
|
||||
return PROCESS_START_TIME__TRIGGER_TYPE__TRIGGER_TYPE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user