1/* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package android.os.statsd.art; 20 21option java_package = "com.android.os.art"; 22option java_multiple_files = true; 23 24// Indicates the type of the APK. 25enum ArtApkType { 26 ART_APK_TYPE_UNKNOWN = 0; 27 // Primary DEX file in a base APK. 28 ART_APK_TYPE_BASE = 1; 29 // Primary DEX file in a split APK. 30 ART_APK_TYPE_SPLIT = 2; 31 // Secondary DEX file. 32 ART_APK_TYPE_SECONDARY = 3; 33} 34 35// Indicates which compile filter was used for the package being loaded in an ART session. 36enum ArtCompileFilter { 37 ART_COMPILATION_FILTER_UNSPECIFIED = 0; 38 ART_COMPILATION_FILTER_ERROR = 1; 39 ART_COMPILATION_FILTER_UNKNOWN = 2; 40 ART_COMPILATION_FILTER_ASSUMED_VERIFIED = 3; 41 ART_COMPILATION_FILTER_EXTRACT = 4; 42 ART_COMPILATION_FILTER_VERIFY = 5; 43 ART_COMPILATION_FILTER_QUICKEN = 6; 44 ART_COMPILATION_FILTER_SPACE_PROFILE = 7; 45 ART_COMPILATION_FILTER_SPACE = 8; 46 ART_COMPILATION_FILTER_SPEED_PROFILE = 9; 47 ART_COMPILATION_FILTER_SPEED = 10; 48 ART_COMPILATION_FILTER_EVERYTHING_PROFILE = 11; 49 ART_COMPILATION_FILTER_EVERYTHING = 12; 50 ART_COMPILATION_FILTER_FAKE_RUN_FROM_APK = 13; 51 ART_COMPILATION_FILTER_FAKE_RUN_FROM_APK_FALLBACK = 14; 52 ART_COMPILATION_FILTER_FAKE_RUN_FROM_VDEX_FALLBACK = 15; 53} 54 55 56// Indicates what triggered the compilation of the package. 57enum ArtCompilationReason { 58 ART_COMPILATION_REASON_UNSPECIFIED = 0; 59 ART_COMPILATION_REASON_ERROR = 1; 60 ART_COMPILATION_REASON_UNKNOWN = 2; 61 ART_COMPILATION_REASON_FIRST_BOOT = 3; 62 ART_COMPILATION_REASON_BOOT = 4; 63 ART_COMPILATION_REASON_INSTALL = 5; 64 ART_COMPILATION_REASON_BG_DEXOPT = 6; 65 ART_COMPILATION_REASON_AB_OTA = 7; 66 ART_COMPILATION_REASON_INACTIVE = 8; 67 ART_COMPILATION_REASON_SHARED = 9; 68 ART_COMPILATION_REASON_INSTALL_WITH_DEX_METADATA = 10; 69 ART_COMPILATION_REASON_POST_BOOT = 11; 70 ART_COMPILATION_REASON_INSTALL_FAST = 12; 71 ART_COMPILATION_REASON_INSTALL_BULK = 13; 72 ART_COMPILATION_REASON_INSTALL_BULK_SECONDARY = 14; 73 ART_COMPILATION_REASON_INSTALL_BULK_DOWNGRADED = 15; 74 ART_COMPILATION_REASON_INSTALL_BULK_SECONDARY_DOWNGRADED = 16; 75 ART_COMPILATION_REASON_BOOT_AFTER_OTA = 17; 76 ART_COMPILATION_REASON_PREBUILT = 18; 77 ART_COMPILATION_REASON_CMDLINE = 19; 78 ART_COMPILATION_REASON_VDEX = 20; 79 ART_COMPILATION_REASON_BOOT_AFTER_MAINLINE_UPDATE = 21; 80} 81 82// Indicates the type of DEX metadata. 83enum ArtDexMetadataType { 84 ART_DEX_METADATA_TYPE_UNKNOWN = 0; 85 ART_DEX_METADATA_TYPE_PROFILE = 1; 86 ART_DEX_METADATA_TYPE_VDEX = 2; 87 ART_DEX_METADATA_TYPE_PROFILE_AND_VDEX = 3; 88 ART_DEX_METADATA_TYPE_NONE = 4; 89 ART_DEX_METADATA_TYPE_ERROR = 5; 90} 91 92// Indicates the GC collector type. 93enum ArtGcCollectorType { 94 ART_GC_COLLECTOR_TYPE_UNKNOWN = 0; 95 ART_GC_COLLECTOR_TYPE_MARK_SWEEP = 1; 96 ART_GC_COLLECTOR_TYPE_CONCURRENT_MARK_SWEEP = 2; 97 ART_GC_COLLECTOR_TYPE_CONCURRENT_MARK_COMPACT = 3; 98 ART_GC_COLLECTOR_TYPE_SEMI_SPACE = 4; 99 ART_GC_COLLECTOR_TYPE_CONCURRENT_COPYING = 5; 100 ART_GC_COLLECTOR_TYPE_CONCURRENT_COPYING_BACKGROUND = 6; 101 ART_GC_COLLECTOR_TYPE_CONCURRENT_MARK_COMPACT_BACKGROUND = 7; 102} 103 104// Indicates the ISA (Instruction Set Architecture). 105enum ArtIsa { 106 ART_ISA_UNKNOWN = 0; 107 ART_ISA_ARM = 1; 108 ART_ISA_ARM64 = 2; 109 ART_ISA_X86 = 3; 110 ART_ISA_X86_64 = 4; 111 ART_ISA_MIPS = 5; 112 ART_ISA_MIPS64 = 6; 113 ART_ISA_RISCV64 = 7; 114} 115 116// DEPRECATED - Used to indicate what class of thread the reported values apply to. 117// Deprecated in Jan 2024 as the corresponding filter is no longer needed. 118enum ArtThreadType { 119 ART_THREAD_UNKNOWN = 0; 120 ART_THREAD_MAIN = 1; 121 ART_THREAD_BACKGROUND = 2; 122} 123 124// Indicates support for userfaultfd and minor fault mode. 125enum ArtUffdSupport { 126 ART_UFFD_SUPPORT_UNKNOWN = 0; 127 ART_UFFD_SUPPORT_UFFD_NOT_SUPPORTED = 1; 128 ART_UFFD_SUPPORT_MINOR_FAULT_MODE_NOT_SUPPORTED = 2; 129 ART_UFFD_SUPPORT_MINOR_FAULT_MODE_SUPPORTED = 3; 130} 131 132// Keep in sync with the ExecResult enum defined in art/runtime/exec_utils.h 133enum ExecResultStatus { 134 // Unable to get the status. 135 EXEC_RESULT_STATUS_UNKNOWN = 0; 136 // Process exited normally with an exit code. 137 EXEC_RESULT_STATUS_EXITED = 1; 138 // Process terminated by a signal. 139 EXEC_RESULT_STATUS_SIGNALED = 2; 140 // Process timed out and killed. 141 EXEC_RESULT_STATUS_TIMED_OUT = 3; 142 // Failed to start the process. 143 EXEC_RESULT_STATUS_START_FAILED = 4; 144 // Process was not run. 145 EXEC_RESULT_STATUS_NOT_RUN = 5; 146 // Process was cancelled. 147 EXEC_RESULT_STATUS_CANCELLED = 6; 148} 149