Maggie White | 5cf0fda | 2019-04-09 16:52:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 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 | |
| 17 | syntax = "proto2"; |
| 18 | |
| 19 | // C++ namespace: android::hardware::google::pixel::PixelAtoms |
| 20 | package android.hardware.google.pixel.PixelAtoms; |
| 21 | |
| 22 | option java_package = "android.hardware.google.pixel"; |
| 23 | option java_outer_classname = "PixelAtoms"; |
| 24 | |
| 25 | /* |
| 26 | * Please note that the following features are not currently supported by |
| 27 | * the IStats->reportVendorAtom implementation: |
| 28 | * - types outside of int, long, float, and string (ex. uint) |
| 29 | * - submessages within an atom |
| 30 | * - repeated fields - arrays must be unrolled |
| 31 | * - field # 1 - this will be occupied by the vendor namespace |
| 32 | */ |
| 33 | |
Tej Singh | b624a78 | 2021-07-02 15:19:29 -0700 | [diff] [blame] | 34 | /* Allocated atom IDs. */ |
Jeffrey Huang | 7494308 | 2021-04-09 10:49:09 -0700 | [diff] [blame] | 35 | message Atom { |
| 36 | oneof pushed { |
| 37 | // AOSP atom ID range starts at 105000 |
| 38 | ChargeStats charge_stats = 105000; |
| 39 | VoltageTierStats voltage_tier_stats = 105001; |
| 40 | BatteryCapacity battery_capacity = 105002; |
| 41 | StorageUfsHealth storage_ufs_health = 105003; |
| 42 | F2fsStatsInfo f2fs_stats = 105004; |
| 43 | ZramMmStat zram_mm_stat = 105005; |
| 44 | ZramBdStat zram_bd_stat = 105006; |
| 45 | BootStatsInfo boot_stats = 105007; |
| 46 | WirelessChargingStats wireless_charging_stats = 105008; |
| 47 | DeviceOrientation device_orientation = 105009; |
| 48 | BatteryCapacityFG fg_capacity = 105010; |
| 49 | PdVidPid pd_vid_pid = 105011; |
| 50 | BatteryEEPROM battery_eeprom = 105012; |
| 51 | VendorSpeakerImpedance vendor_speaker_impedance = 105013; // moved from atoms.proto |
| 52 | StorageUfsResetCount ufs_reset_count = 105014; |
| 53 | PixelMmMetricsPerHour pixel_mm_metrics_per_hour = 105015; |
| 54 | PixelMmMetricsPerDay pixel_mm_metrics_per_day = 105016; |
| 55 | F2fsCompressionInfo f2fs_compression_info = 105017; |
| 56 | VendorChargeCycles vendor_charge_cycles = 105018; // moved from atoms.proto |
| 57 | VendorHardwareFailed vendor_hardware_failed = 105019; // moved from atoms.proto |
| 58 | VendorSlowIo vendor_slow_io = 105020; // moved from atoms.proto |
| 59 | VendorSpeechDspStat vendor_speech_dsp_stat = 105021; // moved from atoms.proto |
| 60 | VendorPhysicalDropDetected vendor_physical_drop_detected = 105022; // moved from atoms.proto |
| 61 | VendorUsbPortOverheat vendor_usb_port_overheat = 105023; // moved from atoms.proto |
| 62 | CmaStatus cma_status = 105024; |
| 63 | CmaStatusExt cma_status_ext = 105025; |
| 64 | VendorBatteryHealthSnapshot vendor_battery_health_snapshot = 105026; // moved from atoms.proto |
| 65 | VendorBatteryCausedShutdown vendor_battery_caused_shutdown = 105027; // moved from atoms.proto |
Daeho Jeong | b802fd4 | 2021-07-13 00:16:11 -0700 | [diff] [blame] | 66 | F2fsGcSegmentInfo f2fs_gc_segment_info = 105028; |
George Lee | 73506ac | 2021-06-09 10:14:26 -0700 | [diff] [blame] | 67 | PowerMitigationStats mitigation_stats = 105029; // moved from atoms.proto |
Stephane Lee | 46bfff7 | 2020-08-17 16:08:15 -0700 | [diff] [blame] | 68 | |
Jeffrey Huang | 7494308 | 2021-04-09 10:49:09 -0700 | [diff] [blame] | 69 | CitadelVersion citadel_version = 100018; // moved from vendor proprietary |
| 70 | CitadelEvent citadel_event = 100019; // moved from vendor proprietary |
Roger Fang | 0ff3f5c | 2021-08-23 19:29:59 +0800 | [diff] [blame] | 71 | VendorSpeakerStatsReported vendor_speaker_stats_reported = 105030; |
Arthur Ishiguro | 0a731b0 | 2021-12-13 17:39:26 +0000 | [diff] [blame] | 72 | |
| 73 | ChreHalNanoappLoadFailed chre_hal_nanoapp_load_failed = 105031; |
| 74 | ChrePalOpenFailed chre_pal_open_failed = 105032; |
| 75 | ChreApiErrorCodeDistributionTaken chre_api_error_code_distribution_taken = 105033; |
| 76 | ChreDynamicMemorySnapshotReported chre_dynamic_memory_snapshot_reported = 105034; |
| 77 | ChreEventQueueSnapshotReported chre_event_queue_snapshot_reported = 105035; |
| 78 | ChreApWakeUpOccurred chre_ap_wake_up_occurred = 105036; |
Stephane Lee | 747d01f | 2022-04-27 13:19:31 -0700 | [diff] [blame] | 79 | |
| 80 | BatteryHealthStatus battery_health_status = 105037; |
Jenny Ho | ce12772 | 2022-02-22 19:52:41 +0800 | [diff] [blame] | 81 | BatteryHealthUsage battery_health_usage = 105038; |
Ocean Chen | 03e386a | 2022-03-10 02:49:40 +0800 | [diff] [blame] | 82 | F2fsSmartIdleMaintEnabledStateChanged f2fs_smart_idle_maint_enabled_state_changed = 105039; |
Ocean Chen | 652c582 | 2022-06-06 02:47:16 +0800 | [diff] [blame] | 83 | BlockStatsReported block_stats_reported = 105040; |
Roger Fang | c8dda04 | 2022-08-19 14:15:17 +0800 | [diff] [blame] | 84 | VendorAudioHardwareStatsReported vendor_audio_hardware_stats_reported = 105041; |
Sayanna Chandula | 9e3b945 | 2022-08-17 15:01:06 -0700 | [diff] [blame] | 85 | |
| 86 | ThermalDfsStats thermal_dfs_stats = 105042; |
Jeffrey Huang | 7494308 | 2021-04-09 10:49:09 -0700 | [diff] [blame] | 87 | } |
Maggie White | 5cf0fda | 2019-04-09 16:52:07 -0700 | [diff] [blame] | 88 | // AOSP atom ID range ends at 109999 |
| 89 | } |
| 90 | |
Tej Singh | b624a78 | 2021-07-02 15:19:29 -0700 | [diff] [blame] | 91 | /* Supported reverse domain names. */ |
Maggie White | 5cf0fda | 2019-04-09 16:52:07 -0700 | [diff] [blame] | 92 | message ReverseDomainNames { |
| 93 | optional string pixel = 1 [default = "com.google.pixel"]; |
| 94 | } |
| 95 | |
| 96 | /* A message containing detailed statistics and debug information about a charge session. */ |
| 97 | message ChargeStats { |
| 98 | /* Charge Adapter stats. */ |
| 99 | enum AdapterType { |
| 100 | ADAPTER_TYPE_UNKNOWN = 0; |
| 101 | ADAPTER_TYPE_USB = 1; |
| 102 | ADAPTER_TYPE_USB_SDP = 2; |
| 103 | ADAPTER_TYPE_USB_DCP = 3; |
| 104 | ADAPTER_TYPE_USB_CDP = 4; |
| 105 | ADAPTER_TYPE_USB_ACA = 5; |
| 106 | ADAPTER_TYPE_USB_C = 6; |
| 107 | ADAPTER_TYPE_USB_PD = 7; |
| 108 | ADAPTER_TYPE_USB_PD_DRP = 8; |
| 109 | ADAPTER_TYPE_USB_PD_PPS = 9; |
| 110 | ADAPTER_TYPE_USB_PD_BRICKID = 10; |
| 111 | ADAPTER_TYPE_HVDCP = 11; |
| 112 | ADAPTER_TYPE_HVDCP3 = 12; |
Maggie White | 571f675 | 2019-07-16 18:51:20 -0700 | [diff] [blame] | 113 | ADAPTER_TYPE_FLOAT = 13; |
| 114 | ADAPTER_TYPE_WLC = 14; |
| 115 | ADAPTER_TYPE_WLC_EPP = 15; |
| 116 | ADAPTER_TYPE_WLC_SPP = 16; |
Stephane Lee | 8cffac7 | 2021-03-16 13:04:06 -0700 | [diff] [blame] | 117 | ADAPTER_TYPE_GPP = 17; |
| 118 | ADAPTER_TYPE_10W = 18; |
| 119 | ADAPTER_TYPE_L7 = 19; |
| 120 | ADAPTER_TYPE_DL = 20; |
| 121 | ADAPTER_TYPE_WPC_EPP = 21; |
| 122 | ADAPTER_TYPE_WPC_GPP = 22; |
| 123 | ADAPTER_TYPE_WPC_10W = 23; |
| 124 | ADAPTER_TYPE_WPC_BPP = 24; |
| 125 | ADAPTER_TYPE_WPC_L7 = 25; |
Prasanna Prapancham | 497106a | 2022-07-11 18:25:17 +0000 | [diff] [blame] | 126 | ADAPTER_TYPE_EXT = 26; |
| 127 | ADAPTER_TYPE_EXT1 = 27; |
| 128 | ADAPTER_TYPE_EXT2 = 28; |
| 129 | ADAPTER_TYPE_EXT_UNKNOWN = 29; |
Maggie White | 5cf0fda | 2019-04-09 16:52:07 -0700 | [diff] [blame] | 130 | } |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 131 | optional string reverse_domain_name = 1; |
Maggie White | 5cf0fda | 2019-04-09 16:52:07 -0700 | [diff] [blame] | 132 | /* Type of charge adapter, enumerated above. */ |
| 133 | optional AdapterType adapter_type = 2; |
| 134 | /* Max negotiated voltage by charge adapter, in mV. */ |
| 135 | optional int32 adapter_voltage = 3; |
| 136 | /* Max negotiated current by charge adapter current, in mA. */ |
| 137 | optional int32 adapter_amperage = 4; |
| 138 | |
| 139 | /* Stats at beginning of charge session. */ |
| 140 | /* System State of Charge, in percent. */ |
| 141 | optional int32 ssoc_in = 5; |
| 142 | /* Voltage in mV. */ |
| 143 | optional int32 voltage_in = 6; |
| 144 | |
| 145 | /* Stats at end of charge session. */ |
| 146 | /* System State of Charge, in percent. */ |
| 147 | optional int32 ssoc_out = 7; |
| 148 | /* Voltage in mV. */ |
| 149 | optional int32 voltage_out = 8; |
Stephane Lee | 8cffac7 | 2021-03-16 13:04:06 -0700 | [diff] [blame] | 150 | |
| 151 | /** |
| 152 | * These values are meant to represent status of the charging device, used |
| 153 | * to validate the charging algorithm and explain charging performances. |
| 154 | * Examples of the content of the register: |
| 155 | * - APDO, PDO (power capabilities of the device, eg. 5V3A, 9V2A, 20V2A) for wired charging |
| 156 | * - Wireless charging MFG code. This is the value of a register of the WLC integrated |
| 157 | * circuit to identify the vendor and type of WLC pad |
| 158 | * - Receiver operating frequency |
| 159 | * - Register status |
| 160 | */ |
| 161 | optional int32 adapter_capabilities0 = 9; |
| 162 | optional int32 adapter_capabilities1 = 10; |
| 163 | optional int32 adapter_capabilities2 = 11; |
| 164 | optional int32 adapter_capabilities3 = 12; |
| 165 | optional int32 adapter_capabilities4 = 13; |
| 166 | |
| 167 | /** |
| 168 | * These are values which reports the state of the wireless receiver, which will help in |
| 169 | * debugging charging issues and alternate configurations. |
| 170 | */ |
| 171 | optional int32 receiver_state0 = 14; |
| 172 | optional int32 receiver_state1 = 15; |
Jenny Ho | 2e4812f | 2021-12-16 19:17:21 +0800 | [diff] [blame] | 173 | |
| 174 | /* AACR feature to record capacity */ |
Jenny Ho | c5e11bd | 2022-02-10 09:11:29 +0800 | [diff] [blame] | 175 | optional int32 charge_capacity = 16; |
Maggie White | 5cf0fda | 2019-04-09 16:52:07 -0700 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | /* A message containing stats from each charge voltage tier. */ |
| 179 | message VoltageTierStats { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 180 | optional string reverse_domain_name = 1; |
Maggie White | 5cf0fda | 2019-04-09 16:52:07 -0700 | [diff] [blame] | 181 | /* Voltage tier number, custom to implementation, should be <= 3. */ |
| 182 | optional int32 voltage_tier = 2; |
| 183 | |
| 184 | /* Stats when entering voltage tier. */ |
| 185 | /* State of charge, in percent. */ |
| 186 | optional float soc_in = 3; |
| 187 | /* Coulomb count, in mAh. */ |
| 188 | optional int32 cc_in = 4; |
| 189 | /* Battery temperature, in deciC. */ |
| 190 | optional int32 temp_in = 5; |
| 191 | |
| 192 | /* Time spent at various charge speeds, in seconds. */ |
| 193 | optional int32 time_fast_secs = 6; |
| 194 | optional int32 time_taper_secs = 7; |
| 195 | optional int32 time_other_secs = 8; |
| 196 | |
| 197 | /* Battery temperature stats, in deciC. */ |
| 198 | optional int32 temp_min = 9; |
| 199 | optional int32 temp_avg = 10; |
| 200 | optional int32 temp_max = 11; |
| 201 | |
| 202 | /* Battery current stats, in mA. */ |
| 203 | optional int32 ibatt_min = 12; |
| 204 | optional int32 ibatt_avg = 13; |
| 205 | optional int32 ibatt_max = 14; |
| 206 | |
| 207 | /* Input current limit stats, in mA. */ |
| 208 | optional int32 icl_min = 15; |
| 209 | optional int32 icl_avg = 16; |
| 210 | optional int32 icl_max = 17; |
Stephane Lee | 8cffac7 | 2021-03-16 13:04:06 -0700 | [diff] [blame] | 211 | |
| 212 | /** |
| 213 | * Efficiency number, receiver operating frequency in kHz for wireless charging |
| 214 | * (alignment) |
| 215 | */ |
| 216 | optional int32 charging_operating_point = 18; |
| 217 | /* The minimum power out of the adapter at the given charging tier */ |
| 218 | optional int32 min_adapter_power_out = 19; |
| 219 | /* The time-averaged power out of the adapter at the given charging tier */ |
| 220 | optional int32 time_avg_adapter_power_out = 20; |
| 221 | /* The maximum power out of the adapter at the given charging tier */ |
| 222 | optional int32 max_adapter_power_out = 21; |
Maggie White | 5cf0fda | 2019-04-09 16:52:07 -0700 | [diff] [blame] | 223 | } |
Maggie White | 4122b0c | 2019-04-19 10:23:14 -0700 | [diff] [blame] | 224 | |
| 225 | /* A message containing an alternate proprietary full battery capacity estimate. */ |
| 226 | message BatteryCapacity { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 227 | optional string reverse_domain_name = 1; |
Maggie White | 4122b0c | 2019-04-19 10:23:14 -0700 | [diff] [blame] | 228 | /* Sum of the change in coulomb count. */ |
| 229 | optional int32 delta_cc_sum = 2; |
| 230 | /* Sum of the change in state of charge (battery level). */ |
| 231 | optional int32 delta_vfsoc_sum = 3; |
| 232 | } |
Ocean Chen | 3189ee9 | 2019-12-10 17:42:55 +0800 | [diff] [blame] | 233 | |
| 234 | /* A message containing health values of UFS */ |
| 235 | message StorageUfsHealth { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 236 | optional string reverse_domain_name = 1; |
Ocean Chen | 3189ee9 | 2019-12-10 17:42:55 +0800 | [diff] [blame] | 237 | /* The value of lifetimeA for UFS health */ |
| 238 | optional int32 lifetime_a = 2; |
| 239 | /* The value of lifetimeB for UFS health */ |
| 240 | optional int32 lifetime_b = 3; |
| 241 | /* The value of lifetimeC for UFS health */ |
| 242 | optional int32 lifetime_c = 4; |
| 243 | } |
| 244 | |
| 245 | /* A message containing filesystem stats of F2FS */ |
| 246 | message F2fsStatsInfo { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 247 | optional string reverse_domain_name = 1; |
Ocean Chen | 3189ee9 | 2019-12-10 17:42:55 +0800 | [diff] [blame] | 248 | /* The value of dirty segments of f2fs */ |
| 249 | optional int32 dirty_segments = 2; |
| 250 | /* The value of free segments of f2fs */ |
| 251 | optional int32 free_segments = 3; |
| 252 | /* The times of checkpoint function called in foreground*/ |
| 253 | optional int32 cp_calls_fg = 4; |
| 254 | /* The times of checkpoint function called in background */ |
Ocean Chen | a2d2626 | 2020-04-05 10:09:27 +0800 | [diff] [blame] | 255 | optional int32 cp_calls_bg = 5; |
Ocean Chen | 3189ee9 | 2019-12-10 17:42:55 +0800 | [diff] [blame] | 256 | /* The times of garbage collection function called in foreground */ |
Ocean Chen | a2d2626 | 2020-04-05 10:09:27 +0800 | [diff] [blame] | 257 | optional int32 gc_calls_fg = 6; |
Ocean Chen | 3189ee9 | 2019-12-10 17:42:55 +0800 | [diff] [blame] | 258 | /* The times of garbage collection function called in background */ |
Ocean Chen | a2d2626 | 2020-04-05 10:09:27 +0800 | [diff] [blame] | 259 | optional int32 gc_calls_bg = 7; |
Ocean Chen | 3189ee9 | 2019-12-10 17:42:55 +0800 | [diff] [blame] | 260 | /* The amount of blocks been moved by garbage collection in foreground */ |
Ocean Chen | a2d2626 | 2020-04-05 10:09:27 +0800 | [diff] [blame] | 261 | optional int32 moved_blocks_fg = 8; |
Ocean Chen | 3189ee9 | 2019-12-10 17:42:55 +0800 | [diff] [blame] | 262 | /* The amount of blocks been moved by garbage collection in background */ |
Ocean Chen | a2d2626 | 2020-04-05 10:09:27 +0800 | [diff] [blame] | 263 | optional int32 moved_blocks_bg = 9; |
Ocean Chen | 3189ee9 | 2019-12-10 17:42:55 +0800 | [diff] [blame] | 264 | /* The average of how many valid blocks is in a segment */ |
Ocean Chen | a2d2626 | 2020-04-05 10:09:27 +0800 | [diff] [blame] | 265 | optional int32 valid_blocks = 10; |
Ocean Chen | 3189ee9 | 2019-12-10 17:42:55 +0800 | [diff] [blame] | 266 | } |
Minchan Kim | 5b655f9 | 2020-02-26 13:51:40 -0800 | [diff] [blame] | 267 | |
| 268 | message ZramMmStat { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 269 | optional string reverse_domain_name = 1; |
Minchan Kim | 5b655f9 | 2020-02-26 13:51:40 -0800 | [diff] [blame] | 270 | /* The value of original memory size */ |
| 271 | optional int64 orig_data_size = 2; |
| 272 | /* The value of compressed memory size */ |
| 273 | optional int64 compr_data_size = 3; |
| 274 | /* The value of consumed memory size to store compressed memory */ |
| 275 | optional int64 mem_used_total = 4; |
| 276 | /* The value of number of page filled with same elements data */ |
| 277 | optional int64 same_pages = 5; |
| 278 | /* The value of number of incompressible page */ |
| 279 | optional int64 huge_pages = 6; |
Chiawei Wang | 4c2cd6a | 2021-03-15 21:44:03 +0800 | [diff] [blame] | 280 | /* The value of number of incompressible pages since boot */ |
| 281 | optional int64 huge_pages_since_boot = 7; |
Minchan Kim | 5b655f9 | 2020-02-26 13:51:40 -0800 | [diff] [blame] | 282 | } |
| 283 | |
| 284 | message ZramBdStat { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 285 | optional string reverse_domain_name = 1; |
Minchan Kim | 5b655f9 | 2020-02-26 13:51:40 -0800 | [diff] [blame] | 286 | /* the number of pages in backing device */ |
| 287 | optional int64 bd_count = 2; |
| 288 | /* The number of pages readed from backing device */ |
| 289 | optional int64 bd_reads = 3; |
| 290 | /* The number of pages written to backing device */ |
| 291 | optional int64 bd_writes = 4; |
| 292 | } |
Jaegeuk Kim | 17c1b69 | 2020-02-27 12:11:12 -0800 | [diff] [blame] | 293 | |
| 294 | /* A message containing boot times */ |
| 295 | message BootStatsInfo { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 296 | optional string reverse_domain_name = 1; |
Jaegeuk Kim | 17c1b69 | 2020-02-27 12:11:12 -0800 | [diff] [blame] | 297 | /* The F2FS fsck time in secs */ |
| 298 | optional int32 fsck_time_sec = 2; |
| 299 | /* The F2FS mounted time in secs */ |
| 300 | optional int32 mounted_time_sec = 3; |
| 301 | /* The F2FS checkpoint=disable time in secs */ |
| 302 | optional int32 checkpoint_time_sec = 4; |
| 303 | } |
Denny cy Lee | 6866f4e | 2020-01-03 16:52:41 +0800 | [diff] [blame] | 304 | |
| 305 | /* A message containing wireless charging health info. */ |
| 306 | message WirelessChargingStats { |
| 307 | /* Captures if a google charger used when start wireless charging */ |
| 308 | enum ChargerVendor { |
| 309 | VENDOR_UNKNOWN = 0; |
| 310 | VENDOR_GOOGLE = 1; |
| 311 | } |
| 312 | |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 313 | optional string reverse_domain_name = 1; |
Denny cy Lee | 6866f4e | 2020-01-03 16:52:41 +0800 | [diff] [blame] | 314 | optional ChargerVendor charger_vendor = 2; |
| 315 | } |
| 316 | |
| 317 | /* Current device Orientation */ |
| 318 | message DeviceOrientation { |
| 319 | enum Orientation { |
| 320 | ORIENTATION_UNKNOWN = 0; |
| 321 | ORIENTATION_0 = 1; |
| 322 | ORIENTATION_90 = 2; |
| 323 | ORIENTATION_180 = 3; |
| 324 | ORIENTATION_270 = 4; |
| 325 | } |
| 326 | |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 327 | optional string reverse_domain_name = 1; |
Denny cy Lee | 6866f4e | 2020-01-03 16:52:41 +0800 | [diff] [blame] | 328 | /* Device orientation. */ |
| 329 | optional Orientation orientation = 2; |
| 330 | } |
Stephane Lee | edf62bf | 2020-03-23 17:13:33 -0700 | [diff] [blame] | 331 | |
| 332 | /* Raw battery capacity stats */ |
| 333 | message BatteryCapacityFG { |
| 334 | enum LogReason { |
| 335 | LOG_REASON_UNKNOWN = 0; |
| 336 | LOG_REASON_CONNECTED = 1; |
| 337 | LOG_REASON_DISCONNECTED = 2; |
| 338 | LOG_REASON_FULL_CHARGE = 3; |
| 339 | LOG_REASON_PERCENT_SKIP = 4; |
| 340 | LOG_REASON_DIVERGING_FG = 5; |
| 341 | } |
| 342 | |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 343 | optional string reverse_domain_name = 1; |
Stephane Lee | edf62bf | 2020-03-23 17:13:33 -0700 | [diff] [blame] | 344 | /* Uevent logging reason, enumerated above. */ |
| 345 | optional LogReason capacity_log_reason = 2; |
| 346 | |
| 347 | /* The battery capacity reported from the FG (fuel gauge) hardware */ |
| 348 | optional float capacity_gdf = 3; |
| 349 | /* The filtered system battery capacity reported to the UI */ |
| 350 | optional float capacity_ssoc = 4; |
| 351 | /* The fuel gauge capacity curve midpoint FG (fuel gauge) value */ |
| 352 | optional float capacity_gdf_curve = 5; |
| 353 | /* The fuel gauge capacity curve midpoint UI value */ |
| 354 | optional float capacity_ssoc_curve = 6; |
| 355 | } |
| 356 | |
Badhri Jagan Sridharan | def8f1f | 2020-03-09 19:23:29 -0700 | [diff] [blame] | 357 | message PdVidPid { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 358 | optional string reverse_domain_name = 1; |
Badhri Jagan Sridharan | def8f1f | 2020-03-09 19:23:29 -0700 | [diff] [blame] | 359 | /* Vendor ID of wired charger */ |
| 360 | optional int32 vid = 2; |
| 361 | /* Product ID of wired charger */ |
| 362 | optional int32 pid = 3; |
| 363 | } |
Andrew Chant | 245091d | 2020-06-18 13:51:18 -0700 | [diff] [blame] | 364 | |
Stephane Lee | 46bfff7 | 2020-08-17 16:08:15 -0700 | [diff] [blame] | 365 | message BatteryEEPROM { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 366 | optional string reverse_domain_name = 1; |
| 367 | /* The cycle count number; record of charge/discharge times */ |
Stephane Lee | 46bfff7 | 2020-08-17 16:08:15 -0700 | [diff] [blame] | 368 | optional int32 cycle_cnt = 2; |
| 369 | /* The current full capacity of the battery under nominal conditions */ |
| 370 | optional int32 full_cap = 3; |
| 371 | /* The battery equivalent series resistance */ |
| 372 | optional int32 esr = 4; |
| 373 | /* Battery resistance related to temperature change */ |
| 374 | optional int32 rslow = 5; |
| 375 | /* Battery health indicator reflecting the battery age state */ |
| 376 | optional int32 soh = 6; |
| 377 | /* The battery temperature */ |
| 378 | optional int32 batt_temp = 7; |
| 379 | |
| 380 | /* Battery state of charge (SOC) shutdown point */ |
| 381 | optional int32 cutoff_soc = 8; |
| 382 | /* Raw battery state of charge (SOC), based on battery current (CC = Coulomb Counter) */ |
| 383 | optional int32 cc_soc = 9; |
| 384 | /* Estimated battery state of charge (SOC) from batt_soc with endpoint limiting (0% and 100%) */ |
| 385 | optional int32 sys_soc = 10; |
| 386 | /* Filtered monotonic SOC, handles situations where the cutoff_soc is increased and |
| 387 | * then decreased from the battery physical properties |
| 388 | */ |
| 389 | optional int32 msoc = 11; |
| 390 | /* Estimated SOC derived from cc_soc that provides voltage loop feedback correction using |
| 391 | * battery voltage, current, and status values |
| 392 | */ |
| 393 | optional int32 batt_soc = 12; |
| 394 | |
| 395 | /* Field used for data padding in the EEPROM data */ |
| 396 | optional int32 reserve = 13; |
| 397 | |
| 398 | /* The maximum battery temperature ever seen */ |
| 399 | optional int32 max_temp = 14; |
| 400 | /* The minimum battery temperature ever seen */ |
| 401 | optional int32 min_temp = 15; |
| 402 | /* The maximum battery voltage ever seen */ |
| 403 | optional int32 max_vbatt = 16; |
| 404 | /* The minimum battery voltage ever seen */ |
| 405 | optional int32 min_vbatt = 17; |
| 406 | /* The maximum battery current ever seen */ |
| 407 | optional int32 max_ibatt = 18; |
| 408 | /* The minimum battery current ever seen */ |
| 409 | optional int32 min_ibatt = 19; |
| 410 | /* Field used to verify the integrity of the EEPROM data */ |
| 411 | optional int32 checksum = 20; |
Jenny Ho | 41b86b4 | 2022-03-17 05:37:33 +0800 | [diff] [blame] | 412 | |
| 413 | /* Extend data for P21 */ |
| 414 | /* Temperature compensation information */ |
| 415 | optional int32 tempco = 21; |
| 416 | /* Learned characterization related to the voltage gauge */ |
| 417 | optional int32 rcomp0 = 22; |
| 418 | /* For time to monitor the life of cell */ |
| 419 | optional int32 timer_h = 23; |
| 420 | /* The full capacity of the battery learning at the end of every charge cycle */ |
| 421 | optional int32 full_rep = 24; |
Stephane Lee | 46bfff7 | 2020-08-17 16:08:15 -0700 | [diff] [blame] | 422 | } |
| 423 | |
Andrew Chant | 245091d | 2020-06-18 13:51:18 -0700 | [diff] [blame] | 424 | /* A message containing an exceptional event from citadel. */ |
| 425 | message CitadelEvent { |
| 426 | enum Event { |
| 427 | ALERT = 1; |
| 428 | REBOOTED = 2; |
| 429 | UPGRADED = 3; |
Chungjui Fan | 2cfc0d5 | 2021-03-04 00:04:48 +0800 | [diff] [blame] | 430 | ALERT_V2 = 4; |
Chungjui Fan | 80d58da | 2022-07-26 15:51:06 +0000 | [diff] [blame] | 431 | SEC_CH_STATE = 5; |
Andrew Chant | 245091d | 2020-06-18 13:51:18 -0700 | [diff] [blame] | 432 | }; |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 433 | optional string reverse_domain_name = 1; |
Andrew Chant | 245091d | 2020-06-18 13:51:18 -0700 | [diff] [blame] | 434 | optional Event event = 2; |
| 435 | optional int32 reset_count = 3; |
| 436 | optional int64 uptime_micros = 4; |
| 437 | enum Priority { |
| 438 | LOW = 0; |
| 439 | MEDIUM = 1; |
| 440 | HIGH = 2; |
| 441 | }; |
| 442 | optional Priority priority = 5; |
| 443 | |
| 444 | // ALERT-specific fields. These fields correspond to the interrupt status |
| 445 | // bits for alerts within citadel. When alerts fire one or more of these |
| 446 | // bits are set to indicate the alert source. |
| 447 | optional int32 intr_sts_0 = 6; |
| 448 | optional int32 intr_sts_1 = 7; |
| 449 | optional int32 intr_sts_2 = 8; |
| 450 | |
| 451 | // REBOOTED-specific fields. These fields correspond to the details of how |
| 452 | // the hardware reboot occurred. A reboot is a noteworthy event for citadel, |
| 453 | // as it can be triggered by events like stack overflow or other software |
| 454 | // bugs. |
| 455 | optional int32 rstsrc = 9; |
| 456 | optional int32 exitpd = 10; |
| 457 | optional int32 which0 = 11; |
| 458 | optional int32 which1 = 12; |
Chungjui Fan | 6be1d9a | 2020-09-26 14:38:54 +0800 | [diff] [blame] | 459 | |
| 460 | // UPGRADED-specific field. This field corresponds to the result of FW |
| 461 | // upgrade for citadel. |
| 462 | optional int32 upgrade_state = 13; |
Chungjui Fan | 2cfc0d5 | 2021-03-04 00:04:48 +0800 | [diff] [blame] | 463 | |
| 464 | // ALERT_V2-specific field. This field corresponds to the GLOBALSEC Log |
| 465 | // which contains normal globalsec, camo, temp and buserr. |
| 466 | optional int32 alert_grp_0 = 14; |
| 467 | optional int32 alert_grp_1 = 15; |
| 468 | optional int32 alert_grp_2 = 16; |
| 469 | optional int32 alert_grp_3 = 17; |
| 470 | optional int32 camo_breaches_0 = 18; |
| 471 | optional int32 camo_breaches_1 = 19; |
| 472 | optional int32 temp_min = 20; |
| 473 | optional int32 temp_max = 21; |
| 474 | optional int32 bus_err = 22; |
Chungjui Fan | 80d58da | 2022-07-26 15:51:06 +0000 | [diff] [blame] | 475 | |
| 476 | // SEC_CH_STATE-specific filed. This field corresponds to the state |
| 477 | // of GSA-GSC secure channel. |
| 478 | optional int32 sec_ch_state = 23; |
Andrew Chant | 245091d | 2020-06-18 13:51:18 -0700 | [diff] [blame] | 479 | } |
| 480 | |
| 481 | /* A message containing the citadel firmware version. */ |
| 482 | message CitadelVersion { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 483 | optional string reverse_domain_name = 1; |
| 484 | optional string version = 2; |
Andrew Chant | 245091d | 2020-06-18 13:51:18 -0700 | [diff] [blame] | 485 | } |
Vova Sharaienko | e18280c | 2021-02-03 02:43:59 +0000 | [diff] [blame] | 486 | |
| 487 | /* A message containing the speaker impedance. */ |
| 488 | message VendorSpeakerImpedance { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 489 | optional string reverse_domain_name = 1; |
Vova Sharaienko | e18280c | 2021-02-03 02:43:59 +0000 | [diff] [blame] | 490 | optional int32 speaker_location = 2; |
| 491 | optional int32 impedance = 3; |
| 492 | } |
Ocean Chen | ef533c3 | 2021-03-05 16:50:56 +0800 | [diff] [blame] | 493 | |
Roger Fang | 0ff3f5c | 2021-08-23 19:29:59 +0800 | [diff] [blame] | 494 | /** |
| 495 | * Logs the reported vendor speaker health stats. |
| 496 | * Logged from: hardware/google/pixel/pixelstats/SysfsCollector.cpp |
| 497 | */ |
| 498 | message VendorSpeakerStatsReported { |
| 499 | /* Vendor reverse domain name (expecting "com.google.pixel") */ |
| 500 | optional string reverse_domain_name = 1; |
| 501 | /* The location of speaker; 0 = left , 1 = right */ |
| 502 | optional int32 speaker_location = 2; |
| 503 | /* The speaker's impedance value (milliOhm) */ |
| 504 | optional int32 impedance = 3; |
| 505 | /* The speaker's maximum temperature (milliDegree C) */ |
| 506 | optional int32 max_temperature = 4; |
| 507 | /* The speaker's execursion length (micrometer) */ |
| 508 | optional int32 excursion = 5; |
| 509 | /* The speaker's heart beat count */ |
| 510 | optional int32 heartbeat = 6; |
| 511 | } |
| 512 | |
Ocean Chen | ef533c3 | 2021-03-05 16:50:56 +0800 | [diff] [blame] | 513 | /* A message containing how many times of ufs host reset */ |
| 514 | message StorageUfsResetCount { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 515 | optional string reverse_domain_name = 1; |
Ocean Chen | ef533c3 | 2021-03-05 16:50:56 +0800 | [diff] [blame] | 516 | /* How many UFS error reset are triggered */ |
| 517 | optional int32 host_reset_count = 2; |
| 518 | } |
Chiawei Wang | ba14fc7 | 2021-02-04 12:59:17 +0800 | [diff] [blame] | 519 | |
| 520 | /* A message containing Pixel memory metrics collected hourly. */ |
| 521 | message PixelMmMetricsPerHour { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 522 | optional string reverse_domain_name = 1; |
Chiawei Wang | 4014841 | 2021-04-06 08:00:30 +0800 | [diff] [blame] | 523 | optional int64 free_pages = 2; |
| 524 | optional int64 anon_pages = 3; |
| 525 | optional int64 file_pages = 4; |
| 526 | optional int64 slab_reclaimable = 5; |
| 527 | optional int64 zspages = 6; |
| 528 | optional int64 unevictable = 7; |
| 529 | optional int64 ion_total_pools = 8; |
| 530 | optional int64 gpu_memory = 9; |
Robin Hsu | 625ec77 | 2022-07-06 12:15:08 +0800 | [diff] [blame] | 531 | optional int64 slab_unreclaimable = 10; |
| 532 | optional int64 psi_cpu_some_total = 11; |
| 533 | optional int64 psi_io_full_total = 12; |
| 534 | optional int64 psi_io_some_total = 13; |
| 535 | optional int64 psi_mem_full_total = 14; |
| 536 | optional int64 psi_mem_some_total = 15; |
| 537 | optional int32 psi_cpu_some_avg10_min = 16; |
| 538 | optional int32 psi_cpu_some_avg10_max = 17; |
| 539 | optional int32 psi_cpu_some_avg10_avg = 18; |
| 540 | optional int32 psi_cpu_some_avg60_min = 19; |
| 541 | optional int32 psi_cpu_some_avg60_max = 20; |
| 542 | optional int32 psi_cpu_some_avg60_avg = 21; |
| 543 | optional int32 psi_cpu_some_avg300_min = 22; |
| 544 | optional int32 psi_cpu_some_avg300_max = 23; |
| 545 | optional int32 psi_cpu_some_avg300_avg = 24; |
| 546 | optional int32 psi_io_full_avg10_min = 25; |
| 547 | optional int32 psi_io_full_avg10_max = 26; |
| 548 | optional int32 psi_io_full_avg10_avg = 27; |
| 549 | optional int32 psi_io_full_avg60_min = 28; |
| 550 | optional int32 psi_io_full_avg60_max = 29; |
| 551 | optional int32 psi_io_full_avg60_avg = 30; |
| 552 | optional int32 psi_io_full_avg300_min = 31; |
| 553 | optional int32 psi_io_full_avg300_max = 32; |
| 554 | optional int32 psi_io_full_avg300_avg = 33; |
| 555 | optional int32 psi_io_some_avg10_min = 34; |
| 556 | optional int32 psi_io_some_avg10_max = 35; |
| 557 | optional int32 psi_io_some_avg10_avg = 36; |
| 558 | optional int32 psi_io_some_avg60_min = 37; |
| 559 | optional int32 psi_io_some_avg60_max = 38; |
| 560 | optional int32 psi_io_some_avg60_avg = 39; |
| 561 | optional int32 psi_io_some_avg300_min = 40; |
| 562 | optional int32 psi_io_some_avg300_max = 41; |
| 563 | optional int32 psi_io_some_avg300_avg = 42; |
| 564 | optional int32 psi_mem_full_avg10_min = 43; |
| 565 | optional int32 psi_mem_full_avg10_max = 44; |
| 566 | optional int32 psi_mem_full_avg10_avg = 45; |
| 567 | optional int32 psi_mem_full_avg60_min = 46; |
| 568 | optional int32 psi_mem_full_avg60_max = 47; |
| 569 | optional int32 psi_mem_full_avg60_avg = 48; |
| 570 | optional int32 psi_mem_full_avg300_min = 49; |
| 571 | optional int32 psi_mem_full_avg300_max = 50; |
| 572 | optional int32 psi_mem_full_avg300_avg = 51; |
| 573 | optional int32 psi_mem_some_avg10_min = 52; |
| 574 | optional int32 psi_mem_some_avg10_max = 53; |
| 575 | optional int32 psi_mem_some_avg10_avg = 54; |
| 576 | optional int32 psi_mem_some_avg60_min = 55; |
| 577 | optional int32 psi_mem_some_avg60_max = 56; |
| 578 | optional int32 psi_mem_some_avg60_avg = 57; |
| 579 | optional int32 psi_mem_some_avg300_min = 58; |
| 580 | optional int32 psi_mem_some_avg300_max = 59; |
| 581 | optional int32 psi_mem_some_avg300_avg = 60; |
Chiawei Wang | ba14fc7 | 2021-02-04 12:59:17 +0800 | [diff] [blame] | 582 | } |
| 583 | |
| 584 | /* A message containing Pixel memory metrics collected daily. */ |
| 585 | message PixelMmMetricsPerDay { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 586 | optional string reverse_domain_name = 1; |
Robin Hsu | 625ec77 | 2022-07-06 12:15:08 +0800 | [diff] [blame] | 587 | optional int64 workingset_refault = 2; /* refault_file */ |
Chiawei Wang | 4014841 | 2021-04-06 08:00:30 +0800 | [diff] [blame] | 588 | optional int64 pswpin = 3; |
| 589 | optional int64 pswpout = 4; |
| 590 | optional int64 allocstall_dma = 5; |
| 591 | optional int64 allocstall_dma32 = 6; |
| 592 | optional int64 allocstall_normal = 7; |
| 593 | optional int64 allocstall_movable = 8; |
| 594 | optional int64 pgalloc_dma = 9; |
| 595 | optional int64 pgalloc_dma32 = 10; |
| 596 | optional int64 pgalloc_normal = 11; |
| 597 | optional int64 pgalloc_movable = 12; |
| 598 | optional int64 pgsteal_kswapd = 13; |
| 599 | optional int64 pgsteal_direct = 14; |
| 600 | optional int64 pgscan_kswapd = 15; |
| 601 | optional int64 pgscan_direct = 16; |
| 602 | optional int64 oom_kill = 17; |
| 603 | optional int64 pgalloc_high = 18; |
| 604 | optional int64 pgcache_hit = 19; |
| 605 | optional int64 pgcache_miss = 20; |
Chiawei Wang | 18e14b8 | 2021-04-15 23:13:32 +0800 | [diff] [blame] | 606 | optional int64 kswapd_stime_clks = 21; |
| 607 | optional int64 kcompactd_stime_clks = 22; |
Robin Hsu | 625ec77 | 2022-07-06 12:15:08 +0800 | [diff] [blame] | 608 | optional int64 direct_reclaim_native_latency_total_time = 23; |
| 609 | optional int64 direct_reclaim_native_latency0 = 24; |
| 610 | optional int64 direct_reclaim_native_latency1 = 25; |
| 611 | optional int64 direct_reclaim_native_latency2 = 26; |
| 612 | optional int64 direct_reclaim_native_latency3 = 27; |
| 613 | optional int64 direct_reclaim_visible_latency_total_time = 28; |
| 614 | optional int64 direct_reclaim_visible_latency0 = 29; |
| 615 | optional int64 direct_reclaim_visible_latency1 = 30; |
| 616 | optional int64 direct_reclaim_visible_latency2 = 31; |
| 617 | optional int64 direct_reclaim_visible_latency3 = 32; |
| 618 | optional int64 direct_reclaim_top_latency_total_time = 33; |
| 619 | optional int64 direct_reclaim_top_latency0 = 34; |
| 620 | optional int64 direct_reclaim_top_latency1 = 35; |
| 621 | optional int64 direct_reclaim_top_latency2 = 36; |
| 622 | optional int64 direct_reclaim_top_latency3 = 37; |
| 623 | optional int64 direct_reclaim_other_latency_total_time = 38; |
| 624 | optional int64 direct_reclaim_other_latency0 = 39; |
| 625 | optional int64 direct_reclaim_other_latency1 = 40; |
| 626 | optional int64 direct_reclaim_other_latency2 = 41; |
| 627 | optional int64 direct_reclaim_other_latency3 = 42; |
| 628 | optional int64 compaction_total_time = 43; |
| 629 | optional int64 compaction_ev_count0 = 44; |
| 630 | optional int64 compaction_ev_count1 = 45; |
| 631 | optional int64 compaction_ev_count2 = 46; |
| 632 | optional int64 compaction_ev_count3 = 47; |
| 633 | optional int64 compaction_ev_count4 = 48; |
| 634 | optional int64 workingset_refault_anon = 49; |
| 635 | optional int64 workingset_refault_file = 50; |
| 636 | optional int64 compact_success = 51; |
| 637 | optional int64 compact_fail = 52; |
| 638 | optional int64 kswapd_low_wmark_hq = 53; |
| 639 | optional int64 kswapd_high_wmark_hq = 54; |
| 640 | optional int64 thp_file_alloc = 55; |
| 641 | optional int64 thp_zero_page_alloc = 56; |
| 642 | optional int64 thp_split_page = 57; |
| 643 | optional int64 thp_migration_split = 58; |
| 644 | optional int64 thp_deferred_split_page = 59; |
Chiawei Wang | 588e328 | 2021-03-09 22:01:47 +0800 | [diff] [blame] | 645 | } |
| 646 | |
| 647 | /* A message containing CMA metrics collected from dogfooding only. */ |
| 648 | message CmaStatus { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 649 | optional string reverse_domain_name = 1; |
Chiawei Wang | 4014841 | 2021-04-06 08:00:30 +0800 | [diff] [blame] | 650 | optional int32 type = 2; |
| 651 | optional int64 cma_alloc_pages_attempts = 3; |
| 652 | optional int64 cma_alloc_pages_soft_attempts = 4; |
| 653 | optional int64 cma_fail_pages = 5; |
| 654 | optional int64 cma_fail_soft_pages = 6; |
| 655 | optional int64 migrated_pages = 7; |
Chiawei Wang | b354a05 | 2021-07-19 22:24:48 +0800 | [diff] [blame] | 656 | optional string cma_heap_name = 8; |
Chiawei Wang | 588e328 | 2021-03-09 22:01:47 +0800 | [diff] [blame] | 657 | } |
| 658 | |
| 659 | /* A message containing CMA metrics (External). */ |
| 660 | message CmaStatusExt { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 661 | optional string reverse_domain_name = 1; |
Chiawei Wang | 4014841 | 2021-04-06 08:00:30 +0800 | [diff] [blame] | 662 | optional int32 type = 2; |
| 663 | optional int64 cma_alloc_latency_low = 3; |
| 664 | optional int64 cma_alloc_latency_mid = 4; |
| 665 | optional int64 cma_alloc_latency_high = 5; |
Chiawei Wang | b354a05 | 2021-07-19 22:24:48 +0800 | [diff] [blame] | 666 | optional string cma_heap_name = 6; |
Chiawei Wang | ba14fc7 | 2021-02-04 12:59:17 +0800 | [diff] [blame] | 667 | } |
Ocean Chen | 17e0ecb | 2021-03-05 17:38:58 +0800 | [diff] [blame] | 668 | |
| 669 | message F2fsCompressionInfo { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 670 | optional string reverse_domain_name = 1; |
Ocean Chen | 17e0ecb | 2021-03-05 17:38:58 +0800 | [diff] [blame] | 671 | /* Show the block count written after compression since mount */ |
| 672 | optional int32 compr_written_blocks = 2; |
| 673 | /* Show the saved block count with compression since mount */ |
| 674 | optional int32 compr_saved_blocks = 3; |
| 675 | /* Show the count of inode newly enabled for compression since mount */ |
| 676 | optional int32 compr_new_inodes = 4; |
| 677 | } |
Vova Sharaienko | c5e3cb2 | 2021-03-16 02:58:08 +0000 | [diff] [blame] | 678 | |
| 679 | /** |
| 680 | * Log bucketed battery charge cycles. |
| 681 | * |
| 682 | * Each bucket represents cycles of the battery past |
| 683 | * a given charge point. For example, bucket 1 is the |
| 684 | * lowest 1/8th of the battery, and bucket 8 is 100%. |
| 685 | * |
| 686 | * Logged from: |
| 687 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 688 | */ |
| 689 | message VendorChargeCycles { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 690 | optional string reverse_domain_name = 1; |
Vova Sharaienko | c5e3cb2 | 2021-03-16 02:58:08 +0000 | [diff] [blame] | 691 | optional int32 cycle_bucket_1 = 2; |
| 692 | optional int32 cycle_bucket_2 = 3; |
| 693 | optional int32 cycle_bucket_3 = 4; |
| 694 | optional int32 cycle_bucket_4 = 5; |
| 695 | optional int32 cycle_bucket_5 = 6; |
| 696 | optional int32 cycle_bucket_6 = 7; |
| 697 | optional int32 cycle_bucket_7 = 8; |
| 698 | optional int32 cycle_bucket_8 = 9; |
| 699 | optional int32 cycle_bucket_9 = 10; |
| 700 | optional int32 cycle_bucket_10 = 11; |
| 701 | } |
| 702 | |
| 703 | /** |
| 704 | * Logs the report of a failed hardware. |
| 705 | * |
| 706 | * Logged from: |
| 707 | * Vendor HALs. |
| 708 | * |
| 709 | */ |
| 710 | message VendorHardwareFailed { |
| 711 | enum HardwareType { |
| 712 | HARDWARE_FAILED_UNKNOWN = 0; |
| 713 | HARDWARE_FAILED_MICROPHONE = 1; |
| 714 | HARDWARE_FAILED_CODEC = 2; |
| 715 | HARDWARE_FAILED_SPEAKER = 3; |
| 716 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 717 | } |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 718 | optional string reverse_domain_name = 1; |
Vova Sharaienko | c5e3cb2 | 2021-03-16 02:58:08 +0000 | [diff] [blame] | 719 | optional HardwareType hardware_type = 2; |
| 720 | |
| 721 | /** |
| 722 | * hardware_location allows vendors to differentiate between multiple |
| 723 | * instances of the same hardware_type. The specific locations are vendor |
| 724 | * defined integers, referring to board-specific numbering schemes. |
| 725 | */ |
| 726 | optional int32 hardware_location = 3; |
| 727 | /** |
| 728 | * failure_code is specific to the HardwareType of the failed hardware. |
| 729 | * It should use one of the enum values defined below. |
| 730 | */ |
| 731 | enum HardwareErrorCode { |
| 732 | UNKNOWN = 0; |
| 733 | COMPLETE = 1; |
| 734 | SPEAKER_HIGH_Z = 2; |
| 735 | SPEAKER_SHORT = 3; |
| 736 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 737 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
| 738 | DEGRADE = 6; |
| 739 | } |
| 740 | optional int32 failure_code = 4; |
| 741 | } |
| 742 | |
| 743 | /** |
| 744 | * Log slow I/O operations on the primary storage. |
| 745 | */ |
| 746 | message VendorSlowIo { |
| 747 | // Classifications of IO Operations. |
| 748 | enum IoOperation { |
| 749 | UNKNOWN = 0; |
| 750 | READ = 1; |
| 751 | WRITE = 2; |
| 752 | UNMAP = 3; |
| 753 | SYNC = 4; |
| 754 | } |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 755 | optional string reverse_domain_name = 1; |
Vova Sharaienko | c5e3cb2 | 2021-03-16 02:58:08 +0000 | [diff] [blame] | 756 | optional IoOperation operation = 2; |
| 757 | |
| 758 | // The number of slow IO operations of this type over 24 hours. |
| 759 | optional int32 count = 3; |
| 760 | } |
| 761 | |
| 762 | /* |
| 763 | * Logs the reported speech DSP status. |
Vova Sharaienko | dc6e6ba | 2021-03-24 02:10:12 +0000 | [diff] [blame] | 764 | * Logged from: Vendor audio implementation. |
Vova Sharaienko | c5e3cb2 | 2021-03-16 02:58:08 +0000 | [diff] [blame] | 765 | */ |
| 766 | message VendorSpeechDspStat { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 767 | optional string reverse_domain_name = 1; |
Vova Sharaienko | c5e3cb2 | 2021-03-16 02:58:08 +0000 | [diff] [blame] | 768 | // The total Speech DSP uptime in milliseconds. |
| 769 | optional int32 total_uptime_millis = 2; |
| 770 | // The total Speech DSP downtime in milliseconds. |
| 771 | optional int32 total_downtime_millis = 3; |
| 772 | optional int32 total_crash_count = 4; |
| 773 | optional int32 total_recover_count = 5; |
| 774 | } |
| 775 | |
| 776 | /** |
| 777 | * Log an event when the device has been physically dropped. |
| 778 | * Reported from the /vendor partition. |
| 779 | */ |
| 780 | message VendorPhysicalDropDetected { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 781 | optional string reverse_domain_name = 1; |
Vova Sharaienko | dc6e6ba | 2021-03-24 02:10:12 +0000 | [diff] [blame] | 782 | // Confidence that the event was actually a drop, 0 -> 100 |
| 783 | optional int32 confidence_pctg = 2; |
| 784 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 785 | optional int32 accel_peak_thousandths_g = 3; |
| 786 | // Duration of freefall in ms |
| 787 | optional int32 freefall_time_millis = 4; |
Vova Sharaienko | c5e3cb2 | 2021-03-16 02:58:08 +0000 | [diff] [blame] | 788 | } |
| 789 | |
| 790 | /** Represents USB port overheat event. */ |
| 791 | message VendorUsbPortOverheat { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 792 | optional string reverse_domain_name = 1; |
Vova Sharaienko | dc6e6ba | 2021-03-24 02:10:12 +0000 | [diff] [blame] | 793 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 794 | optional int32 plug_temperature_deci_c = 2; |
| 795 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree |
| 796 | * C. */ |
| 797 | optional int32 max_temperature_deci_c = 3; |
| 798 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 799 | optional int32 time_to_overheat_secs = 4; |
| 800 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 801 | optional int32 time_to_hysteresis_secs = 5; |
| 802 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 803 | optional int32 time_to_inactive_secs = 6; |
| 804 | } |
Vova Sharaienko | c5e3cb2 | 2021-03-16 02:58:08 +0000 | [diff] [blame] | 805 | |
Vova Sharaienko | dc6e6ba | 2021-03-24 02:10:12 +0000 | [diff] [blame] | 806 | /** |
| 807 | * Log battery health snapshot. |
| 808 | * |
| 809 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 810 | * are snapshotted periodically over 24hrs. |
| 811 | */ |
| 812 | message VendorBatteryHealthSnapshot { |
| 813 | enum BatterySnapshotType { |
| 814 | BATTERY_SNAPSHOT_TYPE_UNKNOWN = 0; |
| 815 | BATTERY_SNAPSHOT_TYPE_MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 816 | BATTERY_SNAPSHOT_TYPE_MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 817 | BATTERY_SNAPSHOT_TYPE_MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 818 | BATTERY_SNAPSHOT_TYPE_MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 819 | BATTERY_SNAPSHOT_TYPE_MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 820 | BATTERY_SNAPSHOT_TYPE_MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 821 | BATTERY_SNAPSHOT_TYPE_MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 822 | BATTERY_SNAPSHOT_TYPE_MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 823 | BATTERY_SNAPSHOT_TYPE_MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 824 | BATTERY_SNAPSHOT_TYPE_MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 825 | BATTERY_SNAPSHOT_TYPE_AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 826 | } |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 827 | optional string reverse_domain_name = 1; |
Vova Sharaienko | dc6e6ba | 2021-03-24 02:10:12 +0000 | [diff] [blame] | 828 | optional BatterySnapshotType type = 2; |
| 829 | // Temperature, in 1/10ths of degree C. |
| 830 | optional int32 temperature_deci_celsius = 3; |
| 831 | // Voltage Battery Voltage, in microVolts. |
| 832 | optional int32 voltage_micro_volt = 4; |
| 833 | // Current Battery current, in microAmps. |
| 834 | optional int32 current_micro_amps = 5; |
| 835 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 836 | optional int32 open_circuit_micro_volt = 6; |
| 837 | // Resistance Battery Resistance, in microOhms. |
| 838 | optional int32 resistance_micro_ohm = 7; |
| 839 | // Level Battery Level, as % of full. |
| 840 | optional int32 level_percent = 8; |
| 841 | } |
Vova Sharaienko | c5e3cb2 | 2021-03-16 02:58:08 +0000 | [diff] [blame] | 842 | |
Vova Sharaienko | dc6e6ba | 2021-03-24 02:10:12 +0000 | [diff] [blame] | 843 | /** |
| 844 | * Log battery caused shutdown with the last recorded voltage. |
| 845 | */ |
| 846 | message VendorBatteryCausedShutdown { |
Jeffrey Huang | 5974bf5 | 2021-04-19 17:04:01 -0700 | [diff] [blame] | 847 | optional string reverse_domain_name = 1; |
| 848 | // The last recorded battery voltage prior to shutdown. |
| 849 | optional int32 last_recorded_micro_volt = 2; |
Vova Sharaienko | c5e3cb2 | 2021-03-16 02:58:08 +0000 | [diff] [blame] | 850 | } |
Daeho Jeong | b802fd4 | 2021-07-13 00:16:11 -0700 | [diff] [blame] | 851 | |
| 852 | /** |
George Lee | 73506ac | 2021-06-09 10:14:26 -0700 | [diff] [blame] | 853 | * Log mitigation statistics. |
| 854 | */ |
| 855 | message PowerMitigationStats { |
| 856 | optional string reverse_domain_name = 1; |
| 857 | // The last triggered count: batoilo. |
| 858 | optional int32 batoilo_count = 2; |
| 859 | // The last triggered count: vdroop1. |
| 860 | optional int32 vdroop1_count = 3; |
| 861 | // The last triggered count: vdroop2. |
| 862 | optional int32 vdroop2_count = 4; |
| 863 | // The last triggered count: smpl_warn. |
| 864 | optional int32 smpl_warn_count = 5; |
| 865 | // The last triggered count: ocp_cpu1. |
| 866 | optional int32 ocp_cpu1_count = 6; |
| 867 | // The last triggered count: ocp_cpu2. |
| 868 | optional int32 ocp_cpu2_count = 7; |
| 869 | // The last triggered count: ocp_gpu. |
| 870 | optional int32 ocp_gpu_count = 8; |
| 871 | // The last triggered count: ocp_tpu. |
| 872 | optional int32 ocp_tpu_count = 9; |
| 873 | // The last triggered count: soft_ocp_cpu1. |
| 874 | optional int32 soft_ocp_cpu1_count = 10; |
| 875 | // The last triggered count: soft_ocp_cpu2. |
| 876 | optional int32 soft_ocp_cpu2_count = 11; |
| 877 | // The last triggered count: soft_ocp_gpu. |
| 878 | optional int32 soft_ocp_gpu_count = 12; |
| 879 | // The last triggered count: soft_ocp_tpu. |
| 880 | optional int32 soft_ocp_tpu_count = 13; |
| 881 | // The last triggered capacity: batoilo. |
| 882 | optional int32 batoilo_cap = 14; |
| 883 | // The last triggered capacity: vdroop1. |
| 884 | optional int32 vdroop1_cap = 15; |
| 885 | // The last triggered capacity: vdroop2. |
| 886 | optional int32 vdroop2_cap = 16; |
| 887 | // The last triggered capacity: smpl_warn. |
| 888 | optional int32 smpl_warn_cap = 17; |
| 889 | // The last triggered capacity: ocp_cpu1. |
| 890 | optional int32 ocp_cpu1_cap = 18; |
| 891 | // The last triggered capacity: ocp_cpu2. |
| 892 | optional int32 ocp_cpu2_cap = 19; |
| 893 | // The last triggered capacity: ocp_gpu. |
| 894 | optional int32 ocp_gpu_cap = 20; |
| 895 | // The last triggered capacity: ocp_tpu. |
| 896 | optional int32 ocp_tpu_cap = 21; |
| 897 | // The last triggered capacity: soft_ocp_cpu1. |
| 898 | optional int32 soft_ocp_cpu1_cap = 22; |
| 899 | // The last triggered capacity: soft_ocp_cpu2. |
| 900 | optional int32 soft_ocp_cpu2_cap = 23; |
| 901 | // The last triggered capacity: soft_ocp_gpu. |
| 902 | optional int32 soft_ocp_gpu_cap = 24; |
| 903 | // The last triggered capacity: soft_ocp_tpu. |
| 904 | optional int32 soft_ocp_tpu_cap = 25; |
| 905 | } |
| 906 | |
| 907 | /** |
Sayanna Chandula | 9e3b945 | 2022-08-17 15:01:06 -0700 | [diff] [blame] | 908 | * Log thermal statistics. |
| 909 | */ |
| 910 | message ThermalDfsStats { |
| 911 | optional string reverse_domain_name = 1; |
| 912 | // The last count of BIG cluster dfs triggers |
| 913 | optional int32 big_dfs_count = 2; |
| 914 | // The last count of MID cluster dfs triggers |
| 915 | optional int32 mid_dfs_count = 3; |
| 916 | // The last count of LITTLE cluster dfs triggers |
| 917 | optional int32 little_dfs_count = 4; |
| 918 | // The last count of GPU dfs triggers |
| 919 | optional int32 gpu_dfs_count = 5; |
| 920 | // The last count of TPU dfs triggers |
| 921 | optional int32 tpu_dfs_count = 6; |
| 922 | // The last count of DSP dfs triggers |
| 923 | optional int32 aur_dfs_count = 7; |
| 924 | } |
| 925 | |
| 926 | /** |
Daeho Jeong | b802fd4 | 2021-07-13 00:16:11 -0700 | [diff] [blame] | 927 | * Log how many segments have been reclaimed in a specific GC mode. |
| 928 | */ |
| 929 | message F2fsGcSegmentInfo { |
| 930 | optional string reverse_domain_name = 1; |
| 931 | /* Reclaimed segments in GC normal mode */ |
| 932 | optional int32 reclaimed_segments_normal = 2; |
| 933 | /* Reclaimed segments in GC urgent high mode */ |
| 934 | optional int32 reclaimed_segments_urgent_high = 3; |
| 935 | /* Reclaimed segments in GC urgent low mode */ |
| 936 | optional int32 reclaimed_segments_urgent_low = 4; |
Ocean Chen | 8985b56 | 2022-05-30 17:29:36 +0800 | [diff] [blame] | 937 | /* Reclaimed segments in GC urgent mid mode */ |
| 938 | optional int32 reclaimed_segments_urgent_mid = 5; |
Daeho Jeong | b802fd4 | 2021-07-13 00:16:11 -0700 | [diff] [blame] | 939 | } |
Arthur Ishiguro | 0a731b0 | 2021-12-13 17:39:26 +0000 | [diff] [blame] | 940 | |
| 941 | /** |
| 942 | * Logs an event indicating that a nanoapp loading has failed at the HAL. |
| 943 | */ |
| 944 | message ChreHalNanoappLoadFailed { |
| 945 | // Vendor reverse domain name (expecting "com.google.pixel"). |
| 946 | optional string reverse_domain_name = 1; |
| 947 | |
| 948 | enum Type { |
| 949 | TYPE_UNKNOWN = 0; |
| 950 | // Corresponds to preloaded nanoapps on the device. |
| 951 | TYPE_PRELOADED = 1; |
| 952 | // Dynamic loading of a nanoapp (e.g. code download). |
| 953 | TYPE_DYNAMIC = 2; |
| 954 | } |
| 955 | |
| 956 | enum Reason { |
| 957 | REASON_UNKNOWN = 0; |
| 958 | // A generic error code that does not match any of the others. |
| 959 | REASON_ERROR_GENERIC = 1; |
| 960 | // Failure at the connection between HAL<->CHRE. |
| 961 | REASON_CONNECTION_ERROR = 2; |
| 962 | // System ran out of memory. |
| 963 | REASON_OOM = 3; |
| 964 | // Nanoapp did not have the right signing for loading. |
| 965 | REASON_SIGNATURE_MISMATCH = 4; |
| 966 | } |
| 967 | |
| 968 | // The 64-bit unique nanoapp identifier of the nanoapp that failed. |
| 969 | optional int64 nanoapp_id = 2; |
| 970 | |
| 971 | // The type of the load event. |
| 972 | optional Type type = 3; |
| 973 | |
| 974 | // The reason for the failure. |
| 975 | optional Reason reason = 4; |
| 976 | } |
| 977 | |
| 978 | /** |
| 979 | * An enum describing a module within CHRE. |
| 980 | */ |
| 981 | enum ChreModuleType { |
| 982 | CHRE_MODULE_TYPE_UNKNOWN = 0; |
| 983 | CHRE_MODULE_TYPE_CHRE = 1; // Core CHRE framework |
| 984 | CHRE_MODULE_TYPE_PAL = 2; // PAL module (could be CHPP) |
| 985 | CHRE_MODULE_TYPE_NANOAPP = 3; |
| 986 | } |
| 987 | |
| 988 | /** |
| 989 | * An enum describing the CHRE PAL type. |
| 990 | */ |
| 991 | enum ChrePalType { |
| 992 | CHRE_PAL_TYPE_UNKNOWN = 0; |
| 993 | CHRE_PAL_TYPE_SENSOR = 1; |
| 994 | CHRE_PAL_TYPE_WIFI = 2; |
| 995 | CHRE_PAL_TYPE_GNSS = 3; |
| 996 | CHRE_PAL_TYPE_WWAN = 4; |
| 997 | CHRE_PAL_TYPE_AUDIO = 5; |
| 998 | CHRE_PAL_TYPE_BLE = 6; |
| 999 | } |
| 1000 | |
| 1001 | /** |
| 1002 | * Logs an event indicating that a CHRE PAL open has failed. |
| 1003 | */ |
| 1004 | message ChrePalOpenFailed { |
| 1005 | // Vendor reverse domain name (expecting "com.google.pixel"). |
| 1006 | optional string reverse_domain_name = 1; |
| 1007 | |
| 1008 | enum Type { |
| 1009 | TYPE_UNKNOWN = 0; |
| 1010 | // Initial open when CHRE starts. |
| 1011 | INITIAL_OPEN = 1; |
| 1012 | // Any form of "reopen" event internally in the PAL. |
| 1013 | REOPEN = 2; |
| 1014 | } |
| 1015 | |
| 1016 | // The PAL this failure event is for. |
| 1017 | optional ChrePalType pal = 2; |
| 1018 | |
| 1019 | // The type of failure observed. |
| 1020 | optional Type type = 3; |
| 1021 | } |
| 1022 | |
| 1023 | /** |
| 1024 | * The type of CHRE API request. |
| 1025 | */ |
| 1026 | enum ChreApiType { |
| 1027 | CHRE_API_TYPE_UNKNOWN = 0; |
| 1028 | CHRE_API_TYPE_WIFI_SCAN_MONITOR = 1; |
| 1029 | CHRE_API_TYPE_WIFI_ACTIVE_SCAN = 2; |
| 1030 | CHRE_API_TYPE_WIFI_RTT_RANGING = 3; |
| 1031 | } |
| 1032 | |
| 1033 | /** |
| 1034 | * The type of CHRE API error. |
| 1035 | */ |
| 1036 | enum ChreError { |
| 1037 | CHRE_ERROR_UNKNOWN = 0; |
| 1038 | |
| 1039 | // No error occurred. |
| 1040 | CHRE_ERROR_NONE = 1; |
| 1041 | |
| 1042 | // An unspecified failure occurred. |
| 1043 | CHRE_ERROR = 2; |
| 1044 | |
| 1045 | // One or more supplied arguments are invalid. |
| 1046 | CHRE_ERROR_INVALID_ARGUMENT = 3; |
| 1047 | |
| 1048 | // Unable to satisfy request because the system is busy. |
| 1049 | CHRE_ERROR_BUSY = 4; |
| 1050 | |
| 1051 | // Unable to allocate memory. |
| 1052 | CHRE_ERROR_NO_MEMORY = 5; |
| 1053 | |
| 1054 | // The requested feature is not supported. |
| 1055 | CHRE_ERROR_NOT_SUPPORTED = 6; |
| 1056 | |
| 1057 | // A timeout occurred while processing the request. |
| 1058 | CHRE_ERROR_TIMEOUT = 7; |
| 1059 | |
| 1060 | // The relevant capability is disabled, for example due to a user |
| 1061 | // configuration that takes precedence over this request. |
| 1062 | CHRE_ERROR_FUNCTION_DISABLED = 8; |
| 1063 | } |
| 1064 | |
| 1065 | /** |
| 1066 | * Distribution of CHRE API error codes. |
| 1067 | */ |
| 1068 | message ChreApiErrorCodeDistributionTaken { |
| 1069 | // Vendor reverse domain name (expecting "com.google.pixel"). |
| 1070 | optional string reverse_domain_name = 1; |
| 1071 | |
| 1072 | // The chreGetTime() value when this snapshot was taken, in milliseconds. |
| 1073 | optional int32 snapshot_chre_get_time_ms = 2; |
| 1074 | |
| 1075 | // The CHRE API type. |
| 1076 | optional ChreApiType api_type = 3; |
| 1077 | |
| 1078 | // Corresponds to the CHRE error code that occurred, as defined in the |
| 1079 | // "enum chreError" field in chre_api/chre/common.h. |
| 1080 | optional ChreError error_code = 4; |
| 1081 | optional int32 num_errors = 5; |
| 1082 | } |
| 1083 | |
| 1084 | /** |
| 1085 | * Snapshot of the dynamic memory allocated in CHRE. |
| 1086 | */ |
| 1087 | message ChreDynamicMemorySnapshotReported { |
| 1088 | // Vendor reverse domain name (expecting "com.google.pixel"). |
| 1089 | optional string reverse_domain_name = 1; |
| 1090 | |
| 1091 | // The chreGetTime() value when this snapshot was taken, in milliseconds. |
| 1092 | optional int32 snapshot_chre_get_time_ms = 2; |
| 1093 | |
| 1094 | // The type of the module. |
| 1095 | optional ChreModuleType module_type = 3; |
| 1096 | |
| 1097 | // The unique 64-bit ID for a nanoapp, only used if the module_type is NANOAPP. |
| 1098 | // If module_type is PAL, then it represents the ChrePalType enum. If the module_type |
| 1099 | // is CHRE, then a zero value should be used. |
| 1100 | optional int64 pal_type_or_nanoapp_id = 4; |
| 1101 | |
| 1102 | // The max allocation amount of this module in bytes. |
| 1103 | optional int32 max_allocation_bytes = 5; |
| 1104 | |
| 1105 | // The current allocation amount of this module in bytes. |
| 1106 | optional int32 current_allocation_bytes = 6; |
| 1107 | } |
| 1108 | |
| 1109 | /** |
| 1110 | * Snapshot of the event queue stats in CHRE. |
| 1111 | */ |
| 1112 | message ChreEventQueueSnapshotReported { |
| 1113 | // Vendor reverse domain name (expecting "com.google.pixel"). |
| 1114 | optional string reverse_domain_name = 1; |
| 1115 | |
| 1116 | // The chreGetTime() value when this snapshot was taken, in milliseconds. |
| 1117 | optional int32 snapshot_chre_get_time_ms = 2; |
| 1118 | |
| 1119 | // The maximum size the event queue got to (i.e. num pending events). |
| 1120 | optional int32 max_event_queue_size = 3; |
| 1121 | |
| 1122 | // The average size the event queue got to (i.e. num pending events). |
| 1123 | optional int32 mean_event_queue_size = 4; |
| 1124 | |
| 1125 | // The number of events that were dropped due to capacity limits. |
| 1126 | optional int32 num_dropped_events = 5; |
| 1127 | |
| 1128 | // The maximum amount of time it took for an event, from when it was received, |
| 1129 | // to when it was delivered to all interested modules. This value represents |
| 1130 | // the total delay within the CHRE subsystem. |
| 1131 | optional int64 max_queue_delay_us = 6; |
| 1132 | |
| 1133 | // The mean value of the delay in microseconds. |
| 1134 | optional int64 mean_queue_delay_us = 7; |
| 1135 | } |
| 1136 | |
| 1137 | /** |
| 1138 | * Indicates that a nanoapp has woken up the AP. |
| 1139 | */ |
| 1140 | message ChreApWakeUpOccurred { |
| 1141 | // Vendor reverse domain name (expecting "com.google.pixel"). |
| 1142 | optional string reverse_domain_name = 1; |
| 1143 | |
| 1144 | // The 64-bit unique nanoapp identifier that describes the entity that has caused an AP wake-up |
| 1145 | // from CHRE. Whenever this event occurs, this means that the nanoapp sent a message to |
| 1146 | // the AP causing a transition between suspend/wake-up. |
| 1147 | optional int64 nanoapp_id = 2; |
| 1148 | } |
Stephane Lee | 747d01f | 2022-04-27 13:19:31 -0700 | [diff] [blame] | 1149 | |
| 1150 | /** |
| 1151 | * Snapshot of the current battery health of the device. |
| 1152 | */ |
| 1153 | message BatteryHealthStatus { |
| 1154 | // Vendor reverse domain name (expecting "com.google.pixel"). |
| 1155 | optional string reverse_domain_name = 1; |
| 1156 | |
| 1157 | // The algorithm that computes how the health status and health indexes are calculated. |
| 1158 | optional int32 health_algorithm = 2; |
| 1159 | |
| 1160 | enum HealthStatus { |
| 1161 | UNKNOWN = 0; // The health status is unknown due to a SW limitation or issue |
| 1162 | NOMINAL = 1; // The battery is operating as expected |
| 1163 | MARGINAL = 2; // The battery may need replacement soon |
| 1164 | NEEDS_REPLACEMENT = 3; // The battery needs replacement |
| 1165 | FAILED = 4; // The battery has failed and no longer operates as expected |
| 1166 | } |
| 1167 | |
| 1168 | // HealthStatus calculated using health_index, health_perf_index. |
| 1169 | optional HealthStatus health_status = 3; |
| 1170 | |
| 1171 | // A percentage measure of the health of the battery with 100% being perfectly healthy. |
| 1172 | optional int32 health_index = 4; |
| 1173 | |
| 1174 | // A percentage measure of the battery capacity of the device, affected by cycle life degradation. |
| 1175 | optional int32 health_capacity_index = 5; |
| 1176 | |
| 1177 | // A percentage measure of the max performance of the device, affected by impedance growth with 100% being perfectly healthy. |
Stephane Lee | cbf14e7 | 2022-05-06 16:16:18 -0700 | [diff] [blame] | 1178 | optional int32 health_impedance_index = 6; |
Stephane Lee | 747d01f | 2022-04-27 13:19:31 -0700 | [diff] [blame] | 1179 | |
| 1180 | // An index that expresses the likelihood of swelling given the SOC residency stats. |
| 1181 | optional int32 swelling_cumulative = 7; |
| 1182 | |
| 1183 | // The battery capacity used to determine the health index. This is the reference value from b/223759710. |
| 1184 | optional int32 health_full_capacity = 8; |
| 1185 | |
| 1186 | // This is the Rslow (resistance) value used (in part) to determine the Perf Index. The activation impedance (b/223545817) can be calculated from it using the perf index. |
| 1187 | optional int32 current_impedance = 9; |
| 1188 | |
| 1189 | // The (hours) value of TimeH (0xb3), a register value, multiplied by 3.2 hours. |
| 1190 | optional int32 battery_age = 10; |
| 1191 | |
| 1192 | // The cycle count at the time of the log event. |
| 1193 | optional int32 cycle_count = 11; |
Jack Wu | af7bc90 | 2022-05-05 20:51:26 +0800 | [diff] [blame] | 1194 | |
| 1195 | enum BattDisconnectStatus { |
| 1196 | BPST_BATT_UNKNOWN = 0; |
| 1197 | BPST_BATT_CONNECT = 1; |
| 1198 | BPST_BATT_DISCONNECT = 2; // Result of single battery disconnect detection |
| 1199 | BPST_BATT_CELL_FAULT = 3; // Result of cell fault detection which means actual disconnection |
| 1200 | } |
| 1201 | |
| 1202 | // Battery disconnect detection stats. |
| 1203 | optional BattDisconnectStatus battery_disconnect_status = 12; |
Stephane Lee | 747d01f | 2022-04-27 13:19:31 -0700 | [diff] [blame] | 1204 | } |
Jenny Ho | ce12772 | 2022-02-22 19:52:41 +0800 | [diff] [blame] | 1205 | |
| 1206 | /** |
| 1207 | * Log battery SOC/temperature usage data. |
| 1208 | * |
| 1209 | * Each data represents cumulative time of the battery |
| 1210 | * spent over a specific SOC and over a specific temperature |
| 1211 | * while charging and while discharging in seconds. |
| 1212 | * |
| 1213 | * Logged from: |
| 1214 | * /sys/class/power_supply/battery/swelling_data, via Vendor. |
| 1215 | */ |
| 1216 | message BatteryHealthUsage { |
| 1217 | // Vendor reverse domain name (expecting "com.google.pixel"). |
| 1218 | optional string reverse_domain_name = 1; |
| 1219 | |
| 1220 | // The temperature limit (deg C) used to accumulate the time above this value. |
| 1221 | optional int32 temperature_limit_deci_c = 2; |
| 1222 | |
| 1223 | // The SOC limit (%) used to accumulate the time above this value. |
| 1224 | optional int32 soc_limit = 3; |
| 1225 | |
| 1226 | // Time (s) accumulated only during charge at the given thresholds. |
| 1227 | optional int32 charge_time_secs = 4; |
| 1228 | |
| 1229 | // Time (s) accumulated only during discharge at the given thresholds. |
| 1230 | optional int32 discharge_time_secs = 5; |
| 1231 | } |
Ocean Chen | 03e386a | 2022-03-10 02:49:40 +0800 | [diff] [blame] | 1232 | |
| 1233 | /* |
| 1234 | * A Value of F2FS smart idle maintenance feature enabled |
| 1235 | */ |
| 1236 | message F2fsSmartIdleMaintEnabledStateChanged { |
| 1237 | optional string reverse_domain_name = 1; |
| 1238 | /* Smart idle maint is enabled */ |
| 1239 | optional bool enabled = 2; |
| 1240 | } |
Ocean Chen | 652c582 | 2022-06-06 02:47:16 +0800 | [diff] [blame] | 1241 | |
| 1242 | /* |
| 1243 | * Snapshot of the block layer read write stats |
| 1244 | */ |
| 1245 | message BlockStatsReported { |
| 1246 | optional string reverse_domain_name = 1; |
| 1247 | /* number of read I/Os processed */ |
| 1248 | optional int64 read_io = 2; |
| 1249 | /* number of sectors read */ |
| 1250 | optional int64 read_sectors = 3; |
| 1251 | /* total wait time for read requests */ |
| 1252 | optional int64 read_ticks = 4; |
| 1253 | /* number of write I/Os processed */ |
| 1254 | optional int64 write_io = 5; |
| 1255 | /* number of sectors written */ |
| 1256 | optional int64 write_sectors = 6; |
| 1257 | /* total wait time for write requests */ |
| 1258 | optional int64 write_ticks = 7; |
Jack Wu | af7bc90 | 2022-05-05 20:51:26 +0800 | [diff] [blame] | 1259 | } |
Roger Fang | c8dda04 | 2022-08-19 14:15:17 +0800 | [diff] [blame] | 1260 | |
| 1261 | /** |
| 1262 | * Logs the reported vendor audio hardware stats. |
| 1263 | */ |
| 1264 | message VendorAudioHardwareStatsReported { |
Roger Fang | 7172d48 | 2022-08-24 05:42:19 +0800 | [diff] [blame] | 1265 | optional string reverse_domain_name = 1; |
Roger Fang | c8dda04 | 2022-08-19 14:15:17 +0800 | [diff] [blame] | 1266 | /* The percentage of calls in a day where auto-mic-switch triggered. |
| 1267 | * It represented as a fixed-point integer with three decimal place. |
| 1268 | * E.g.:12.345% is repsented by 12345. |
| 1269 | */ |
Roger Fang | fa8cfd6 | 2022-08-25 15:23:03 +0800 | [diff] [blame] | 1270 | optional int32 milli_rate_of_ams_per_day = 2; |
Roger Fang | c8dda04 | 2022-08-19 14:15:17 +0800 | [diff] [blame] | 1271 | } |