• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto2";
2
3package android.os.statsd.art;
4
5import "frameworks/proto_logging/stats/atoms.proto";
6import "frameworks/proto_logging/stats/atom_field_options.proto";
7import "frameworks/proto_logging/stats/enums/art/common_enums.proto";
8import "frameworks/proto_logging/stats/enums/art/odrefresh_enums.proto";
9
10option java_package = "com.android.os.art";
11option java_multiple_files = true;
12
13extend Atom {
14    optional OdrefreshReported odrefresh_reported = 366 [(module) = "art"];
15    optional OdsignReported odsign_reported = 548 [(module) = "art"];
16}
17
18/*
19 * Logs information about on-device refresh of ART AOT artifacts for boot classpath extensions
20 * and system_server.
21 *
22 * Logged from:
23 *   art/odrefresh/odrefresh.cc
24 */
25 message OdrefreshReported {
26    optional int64 art_apex_version = 1;
27    optional OdrefreshTrigger trigger = 2;
28    optional OdrefreshStage stage_reached = 3;
29    optional OdrefreshStatus status = 4;
30
31    // Compilation time of the boot classpath for the primary architecture
32    // ("primary boot classpath"), in seconds.
33    optional int32 primary_bcp_compilation_seconds = 5;
34
35    // Compilation time of the boot classpath for the secondary architecture
36    // ("secondary boot classpath"), if any, in seconds.
37    optional int32 secondary_bcp_compilation_seconds = 6;
38
39    // Compilation time of system_server classpath, in seconds.
40    optional int32 system_server_compilation_seconds = 7;
41
42    // Cache space at start of update.
43    optional int32 cache_space_free_start_mib = 8;
44
45    // Cache space at end of update.
46    optional int32 cache_space_free_end_mib = 9;
47
48    // Compilation time of the boot classpath for the primary architecture
49    // ("primary boot classpath"), in milliseconds.
50    optional int32 primary_bcp_compilation_millis = 10;
51
52    // Compilation time of the boot classpath for the secondary architecture
53    // ("secondary boot classpath"), if any, in milliseconds.
54    optional int32 secondary_bcp_compilation_millis = 11;
55
56    // Compilation time of system_server classpath, in milliseconds.
57    optional int32 system_server_compilation_millis = 12;
58
59    // Status for the compilation of the boot
60    // classpath for the primary architecture.
61    optional ExecResultStatus primary_bcp_dex2oat_result_status = 13;
62
63    // Exit code for the compilation of the boot classpath for the
64    // primary architecture if status is EXEC_RESULT_STATUS_EXITED, else -1.
65    optional int32 primary_bcp_dex2oat_result_exit_code = 14;
66
67    // Signal for the compilation of the boot classpath for the
68    // primary architecture if status is EXEC_RESULT_STATUS_SIGNALED, else 0.
69    optional int32 primary_bcp_dex2oat_result_signal = 15;
70
71    // Status for the compilation of the boot
72    // classpath for the secondary architecture.
73    optional ExecResultStatus secondary_bcp_dex2oat_result_status = 16;
74
75    // Exit code for the compilation of the boot classpath for the
76    // secondary architecture if status is EXEC_RESULT_STATUS_EXITED, else -1.
77    optional int32 secondary_bcp_dex2oat_result_exit_code = 17;
78
79    // Signal for the compilation of the boot classpath for the
80    // secondary architecture if status is EXEC_RESULT_STATUS_SIGNALED, else 0.
81    optional int32 secondary_bcp_dex2oat_result_signal = 18;
82
83    // Status for the compilation of the boot classpath for the system_server.
84    optional ExecResultStatus system_server_dex2oat_result_status = 19;
85
86    // Exit code for the compilation of the boot classpath for the
87    // system_server if status is EXEC_RESULT_STATUS_EXITED, else -1.
88    optional int32 system_server_dex2oat_result_exit_code = 20;
89
90    // Signal for the compilation of the boot classpath for the
91    // system_server if status is EXEC_RESULT_STATUS_SIGNALED, else 0.
92    optional int32 system_server_dex2oat_result_signal = 21;
93
94    optional OdrefreshBcpCompilationType primary_bcp_compilation_type = 22;
95    optional OdrefreshBcpCompilationType secondary_bcp_compilation_type = 23;
96};
97
98/**
99 * Logs odsign metrics.
100 *
101 * Logged from:
102 *   frameworks/base/services/core/java/com/android/server/pm/dex/OdsignStatsLogger.java
103 */
104 message OdsignReported {
105    enum Status {
106        // Unknown value.
107        STATUS_UNSPECIFIED = 0;
108        // All artifacts are generated and signed.
109        STATUS_ALL_OK = 1;
110        // Some artifacts are generated and signed, but odrefresh failed to generate the rest. See
111        // odrefresh metrics for the odrefresh failure.
112        STATUS_PARTIAL_OK = 2;
113        // Odrefresh failed to generate any artifact. See odrefresh metrics for the odrefresh
114        // failure.
115        STATUS_ODREFRESH_FAILED = 3;
116        // Odsign failed when interacting with Keystore.
117        STATUS_KEYSTORE_FAILED = 4;
118        // Odsign failed when initializing certificate.
119        STATUS_CERT_FAILED = 5;
120        // Odsign failed when cleaning up existing artifacts. Note that odrefresh may also clean up
121        // existing artifacts, and failures about that are logged as `STATUS_ODREFRESH_FAILED`.
122        STATUS_CLEANUP_FAILED = 6;
123        // Odsign failed when signing artifacts.
124        STATUS_SIGNING_FAILED = 7;
125    }
126
127    optional Status status = 1;
128}
129