xref: /aosp_15_r20/frameworks/proto_logging/stats/enums/art/odrefresh_enums.proto (revision 64c55175f22a2714b5ba1250098ad9bbc12ec7cd)
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// Keep in sync with the BcpCompilationType enum defined in art/odrefresh/odr_metrics.h
25enum OdrefreshBcpCompilationType {
26  ODREFRESH_BCP_COMPILATION_TYPE_UNKNOWN = 0;
27  // Compiles for both the primary boot image and the mainline extension.
28  ODREFRESH_BCP_COMPILATION_TYPE_PRIMARY_AND_MAINLINE = 1;
29  // Only compiles for the mainline extension.
30  ODREFRESH_BCP_COMPILATION_TYPE_MAINLINE = 2;
31}
32
33// Keep in sync with the Stage enum defined in art/odrefresh/odr_metrics.h
34enum OdrefreshStage {
35  // A placeholder for unknown values.
36  ODREFRESH_STAGE_UNKNOWN = 0;
37
38  // Checking stage.
39  ODREFRESH_STAGE_CHECK = 10;
40
41  // Preparation for compilation.
42  ODREFRESH_STAGE_PREPARATION = 20;
43
44  // Compilation of the boot classpath for the primary architecture
45  // ("primary boot classpath").
46  ODREFRESH_STAGE_PRIMARY_BOOT_CLASSPATH = 30;
47
48  // Compilation of the boot classpath for the secondary architecture
49  // ("secondary boot classpath"), if any.
50  ODREFRESH_STAGE_SECONDARY_BOOT_CLASSPATH = 40;
51
52  // Compilation of system_server classpath.
53  ODREFRESH_STAGE_SYSTEM_SERVER_CLASSPATH = 50;
54
55  // All stages completed.
56  ODREFRESH_STAGE_COMPLETE = 60;
57}
58
59// Keep in sync with the Status enum defined in art/odrefresh/odr_metrics.h
60enum OdrefreshStatus {
61  // A placeholder for unknown values.
62  ODREFRESH_STATUS_UNKNOWN = 0;
63
64  // OK, no problems encountered.
65  ODREFRESH_STATUS_OK = 1;
66
67  // Insufficient space.
68  ODREFRESH_STATUS_NO_SPACE = 2;
69
70  // Storage operation failed.
71  ODREFRESH_STATUS_IO_ERROR = 3;
72
73  // Dex2oat reported an error.
74  ODREFRESH_STATUS_DEX2OAT_ERROR = 4;
75
76  reserved 5; // was STATUS_TIME_LIMIT_EXCEEDED
77
78  // Failure creating staging area.
79  ODREFRESH_STATUS_STAGING_FAILED = 6;
80
81  // Installation of artifacts failed.
82  ODREFRESH_STATUS_INSTALL_FAILED = 7;
83
84  // Failed to access the dalvik-cache directory due to lack of
85  // permission.
86  ODREFRESH_STATUS_DALVIK_CACHE_PERMISSION_DENIED = 8;
87}
88
89// Keep in sync with the Trigger enum defined in art/odrefresh/odr_metrics.h
90enum OdrefreshTrigger {
91  // A placeholder for unknown values.
92  ODREFRESH_TRIGGER_UNKNOWN = 0;
93
94  // ART APEX version has changed since time artifacts were generated.
95  ODREFRESH_TRIGGER_APEX_VERSION_MISMATCH = 1;
96
97  // Dex files on the boot classpath or system_server classpath have changed.
98  ODREFRESH_TRIGGER_DEX_FILES_CHANGED = 2;
99
100  // Missing artifacts.
101  ODREFRESH_TRIGGER_MISSING_ARTIFACTS = 3;
102}
103