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 17syntax = "proto2"; 18 19// C++ namespace: android::hardware::google::pixel::PixelAtoms 20package android.hardware.google.pixel.PixelAtoms; 21 22option optimize_for = LITE_RUNTIME; 23 24option java_package = "android.hardware.google.pixel"; 25option java_outer_classname = "PixelAtoms"; 26 27import "frameworks/proto_logging/stats/atom_field_options.proto"; 28import "frameworks/proto_logging/stats/enums/app/app_enums.proto"; 29 30/* 31 * Please note that the following features are not currently supported by 32 * the IStats->reportVendorAtom implementation: 33 * - types outside of int, long, float, bool and string (ex. uint) 34 * - submessages within an atom 35 * - field # 1 - this will be occupied by the vendor namespace 36 */ 37 38/* Allocated atom IDs. */ 39message Atom { 40 oneof pushed { 41 // AOSP atom ID range starts at 105000 42 ChargeStats charge_stats = 105000; 43 VoltageTierStats voltage_tier_stats = 105001; 44 BatteryCapacity battery_capacity = 105002; 45 StorageUfsHealth storage_ufs_health = 105003; 46 F2fsStatsInfo f2fs_stats = 105004; 47 ZramMmStat zram_mm_stat = 105005; 48 ZramBdStat zram_bd_stat = 105006; 49 BootStatsInfo boot_stats = 105007; 50 // 105008 - 105009 is available. 51 BatteryCapacityFG fg_capacity = 105010; 52 PdVidPid pd_vid_pid = 105011; 53 BatteryEEPROM battery_eeprom = 105012; 54 VendorSpeakerImpedance vendor_speaker_impedance = 105013; // moved from atoms.proto 55 StorageUfsResetCount ufs_reset_count = 105014; 56 PixelMmMetricsPerHour pixel_mm_metrics_per_hour = 105015; 57 PixelMmMetricsPerDay pixel_mm_metrics_per_day = 105016; 58 F2fsCompressionInfo f2fs_compression_info = 105017; 59 VendorChargeCycles vendor_charge_cycles = 105018; // moved from atoms.proto 60 VendorHardwareFailed vendor_hardware_failed = 105019; // moved from atoms.proto 61 VendorSlowIo vendor_slow_io = 105020; // moved from atoms.proto 62 VendorSpeechDspStat vendor_speech_dsp_stat = 105021; // moved from atoms.proto 63 VendorPhysicalDropDetected vendor_physical_drop_detected = 64 105022 [(android.os.statsd.module) = "pixelstats"]; // moved from atoms.proto 65 VendorUsbPortOverheat vendor_usb_port_overheat = 105023; // moved from atoms.proto 66 CmaStatus cma_status = 105024; 67 CmaStatusExt cma_status_ext = 105025; 68 VendorBatteryHealthSnapshot vendor_battery_health_snapshot = 69 105026 [(android.os.statsd.module) = "pixelhealth"]; // moved from atoms.proto 70 VendorBatteryCausedShutdown vendor_battery_caused_shutdown = 71 105027 [(android.os.statsd.module) = "pixelhealth"]; // moved from atoms.proto 72 F2fsGcSegmentInfo f2fs_gc_segment_info = 105028; 73 PowerMitigationStats mitigation_stats = 105029; // moved from atoms.proto 74 75 CitadelVersion citadel_version = 100018; // moved from vendor proprietary 76 CitadelEvent citadel_event = 100019; // moved from vendor proprietary 77 VendorSpeakerStatsReported vendor_speaker_stats_reported = 105030; 78 79 ChreHalNanoappLoadFailed chre_hal_nanoapp_load_failed = 80 105031 [(android.os.statsd.module) = "chre"]; 81 ChrePalOpenFailed chre_pal_open_failed = 105032 [(android.os.statsd.module) = "chre"]; 82 ChreApiErrorCodeDistributionTaken chre_api_error_code_distribution_taken = 83 105033 [(android.os.statsd.module) = "chre"]; 84 ChreDynamicMemorySnapshotReported chre_dynamic_memory_snapshot_reported = 85 105034 [(android.os.statsd.module) = "chre"]; 86 ChreEventQueueSnapshotReported chre_event_queue_snapshot_reported = 87 105035 [(android.os.statsd.module) = "chre"]; 88 ChreApWakeUpOccurred chre_ap_wake_up_occurred = 105036 [(android.os.statsd.module) = "chre"]; 89 90 BatteryHealthStatus battery_health_status = 105037; 91 BatteryHealthUsage battery_health_usage = 105038; 92 F2fsSmartIdleMaintEnabledStateChanged f2fs_smart_idle_maint_enabled_state_changed = 105039; 93 BlockStatsReported block_stats_reported = 105040; 94 VendorAudioHardwareStatsReported vendor_audio_hardware_stats_reported = 105041; 95 96 ThermalDfsStats thermal_dfs_stats = 105042; 97 VendorLongIRQStatsReported vendor_long_irq_stats_reported = 105043; 98 VendorResumeLatencyStats vendor_resume_latency_stats = 105044; 99 VendorTempResidencyStats vendor_temp_residency_stats = 105045; 100 BrownoutDetected brownout_detected = 105046; 101 PcieLinkStatsReported pcie_link_stats = 105047; 102 VendorSensorCoolingDeviceStats vendor_sensor_cooling_device_stats = 105048; 103 104 VibratorPlaycountReported vibrator_playcount_reported = 105049; 105 VibratorLatencyReported vibrator_latency_reported = 105050; 106 VibratorErrorsReported vibrator_errors_reported = 105051; 107 F2fsAtomicWriteInfo f2fs_atomic_write_info = 105052; 108 PartitionsUsedSpaceReported partition_used_space_reported = 105053; 109 PowerMitigationDurationCounts mitigation_duration = 105054; // moved from atoms.proto 110 DisplayPanelErrorStats display_panel_error_stats = 105055; 111 VendorAudioPdmStatsReported vendor_audio_pdm_stats_reported = 105056; 112 VendorAudioThirdPartyEffectStatsReported vendor_audio_third_party_effect_stats_reported = 105057; 113 VendorAudioAdaptedInfoStatsReported vendor_audio_adapted_info_stats_reported = 105058; 114 GpuEvent gpu_event = 105059; 115 VendorAudioPcmStatsReported vendor_audio_pcm_stats_reported = 105060; 116 VendorUsbDataSessionEvent vendor_usb_data_session_event = 105061; 117 ThermalSensorAbnormalityDetected thermal_sensor_abnormality_detected = 105062; 118 VendorAudioOffloadedEffectStatsReported vendor_audio_offloaded_effect_stats_reported = 105063; 119 VendorAudioBtMediaStatsReported vendor_audio_bt_media_stats_reported = 105064; 120 PixelImpulseUsageReported pixel_impulse_usage_reported = 105065; 121 DisplayPortErrorStats display_port_error_stats = 105066; 122 HDCPAuthTypeStats hdcp_auth_type_stats = 105067; 123 DisplayPortUsage display_port_usage = 105068; 124 FuelGaugeAbnormalityReported fuel_gauge_abnormality_reported = 105069; 125 MmProcessUsageByOomGroupSnapshot mm_process_usage_by_oom_group_snapshot = 105070; 126 MmGcmaSnapshot mm_gcma_snapshot = 105071; 127 MmGcmaStats mm_gcma_stats = 105072; 128 VendorAudioUsbDeviceCapabilityStats vendor_audio_usb_device_capability_stats = 105073 [(android.os.statsd.module) = "pixelaudio"]; 129 BatteryTimeToFullStatsReported battery_time_to_full_stats_reported = 105074; 130 VendorAudioDirectUsbAccessUsageStats vendor_audio_direct_usb_access_usage_stats = 105075 [(android.os.statsd.module) = "pixelaudio"]; 131 VendorAudioUsbConfigStats vendor_audio_usb_config_stats = 105076 [(android.os.statsd.module) = "pixelaudio"]; 132 } 133 // AOSP atom ID range ends at 109999 134 reserved 109997; // reserved for VtsVendorAtomJavaTest test atom 135 reserved 109998; // reserved for VtsVendorAtomJavaTest test atom 136 reserved 109999; // reserved for VtsVendorAtomJavaTest test atom 137} 138 139/* Supported reverse domain names. */ 140message ReverseDomainNames { 141 optional string pixel = 1 [default = "com.google.pixel"]; 142} 143 144/* A message containing detailed statistics and debug information about a charge session. */ 145message ChargeStats { 146 /* Charge Adapter stats. */ 147 enum AdapterType { 148 ADAPTER_TYPE_UNKNOWN = 0; 149 ADAPTER_TYPE_USB = 1; 150 ADAPTER_TYPE_USB_SDP = 2; 151 ADAPTER_TYPE_USB_DCP = 3; 152 ADAPTER_TYPE_USB_CDP = 4; 153 ADAPTER_TYPE_USB_ACA = 5; 154 ADAPTER_TYPE_USB_C = 6; 155 ADAPTER_TYPE_USB_PD = 7; 156 ADAPTER_TYPE_USB_PD_DRP = 8; 157 ADAPTER_TYPE_USB_PD_PPS = 9; 158 ADAPTER_TYPE_USB_PD_BRICKID = 10; 159 ADAPTER_TYPE_HVDCP = 11; 160 ADAPTER_TYPE_HVDCP3 = 12; 161 ADAPTER_TYPE_FLOAT = 13; 162 ADAPTER_TYPE_WLC = 14; 163 ADAPTER_TYPE_WLC_EPP = 15; 164 ADAPTER_TYPE_WLC_SPP = 16; 165 ADAPTER_TYPE_GPP = 17; 166 ADAPTER_TYPE_10W = 18; 167 ADAPTER_TYPE_L7 = 19; 168 ADAPTER_TYPE_DL = 20; 169 ADAPTER_TYPE_WPC_EPP = 21; 170 ADAPTER_TYPE_WPC_GPP = 22; 171 ADAPTER_TYPE_WPC_10W = 23; 172 ADAPTER_TYPE_WPC_BPP = 24; 173 ADAPTER_TYPE_WPC_L7 = 25; 174 ADAPTER_TYPE_EXT = 26; 175 ADAPTER_TYPE_EXT1 = 27; 176 ADAPTER_TYPE_EXT2 = 28; 177 ADAPTER_TYPE_EXT_UNKNOWN = 29; 178 ADAPTER_TYPE_USB_UNKNOWN = 30; 179 ADAPTER_TYPE_WLC_UNKNOWN = 31; 180 } 181 optional string reverse_domain_name = 1; 182 /* Type of charge adapter, enumerated above. */ 183 optional AdapterType adapter_type = 2; 184 /* Max negotiated voltage by charge adapter, in mV. */ 185 optional int32 adapter_voltage = 3; 186 /* Max negotiated current by charge adapter current, in mA. */ 187 optional int32 adapter_amperage = 4; 188 189 /* Stats at beginning of charge session. */ 190 /* System State of Charge, in percent. */ 191 optional int32 ssoc_in = 5; 192 /* Voltage in mV. */ 193 optional int32 voltage_in = 6; 194 195 /* Stats at end of charge session. */ 196 /* System State of Charge, in percent. */ 197 optional int32 ssoc_out = 7; 198 /* Voltage in mV. */ 199 optional int32 voltage_out = 8; 200 201 /** 202 * These values are meant to represent status of the charging device, used 203 * to validate the charging algorithm and explain charging performances. 204 * Examples of the content of the register: 205 * - APDO, PDO (power capabilities of the device, eg. 5V3A, 9V2A, 20V2A) for wired charging 206 * - Wireless charging MFG code. This is the value of a register of the WLC integrated 207 * circuit to identify the vendor and type of WLC pad 208 * - Receiver operating frequency 209 * - Register status 210 */ 211 optional int32 adapter_capabilities0 = 9; 212 optional int32 adapter_capabilities1 = 10; 213 optional int32 adapter_capabilities2 = 11; 214 optional int32 adapter_capabilities3 = 12; 215 optional int32 adapter_capabilities4 = 13; 216 217 /** 218 * These are values which reports the state of the wireless receiver, which will help in 219 * debugging charging issues and alternate configurations. 220 */ 221 optional int32 receiver_state0 = 14; 222 optional int32 receiver_state1 = 15; 223 224 /* AACR feature to record capacity */ 225 optional int32 charge_capacity = 16; 226 227 /* Charging Speed Indicator(CSI) status and type */ 228 optional int32 csi_aggregate_status = 17; 229 optional int32 csi_aggregate_type = 18; 230} 231 232/* A message containing stats from each charge voltage tier. */ 233message VoltageTierStats { 234 optional string reverse_domain_name = 1; 235 /* Voltage tier number, custom to implementation, should be <= 3. */ 236 optional int32 voltage_tier = 2; 237 238 /* Stats when entering voltage tier. */ 239 /* State of charge, in percent. */ 240 optional float soc_in = 3; 241 /* Coulomb count, in mAh. */ 242 optional int32 cc_in = 4; 243 /* Battery temperature, in deciC. */ 244 optional int32 temp_in = 5; 245 246 /* Time spent at various charge speeds, in seconds. */ 247 optional int32 time_fast_secs = 6; 248 optional int32 time_taper_secs = 7; 249 optional int32 time_other_secs = 8; 250 251 /* Battery temperature stats, in deciC. */ 252 optional int32 temp_min = 9; 253 optional int32 temp_avg = 10; 254 optional int32 temp_max = 11; 255 256 /* Battery current stats, in mA. */ 257 optional int32 ibatt_min = 12; 258 optional int32 ibatt_avg = 13; 259 optional int32 ibatt_max = 14; 260 261 /* Input current limit stats, in mA. */ 262 optional int32 icl_min = 15; 263 optional int32 icl_avg = 16; 264 optional int32 icl_max = 17; 265 266 /** 267 * Efficiency number, receiver operating frequency in kHz for wireless charging 268 * (alignment) 269 */ 270 optional int32 charging_operating_point = 18; 271 /* The minimum power out of the adapter at the given charging tier */ 272 optional int32 min_adapter_power_out = 19; 273 /* The time-averaged power out of the adapter at the given charging tier */ 274 optional int32 time_avg_adapter_power_out = 20; 275 /* The maximum power out of the adapter at the given charging tier */ 276 optional int32 max_adapter_power_out = 21; 277} 278 279/* A message containing an alternate proprietary full battery capacity estimate. */ 280message BatteryCapacity { 281 optional string reverse_domain_name = 1; 282 /* Sum of the change in coulomb count. */ 283 optional int32 delta_cc_sum = 2; 284 /* Sum of the change in state of charge (battery level). */ 285 optional int32 delta_vfsoc_sum = 3; 286} 287 288/* A message containing health values of UFS */ 289message StorageUfsHealth { 290 optional string reverse_domain_name = 1; 291 /* The value of lifetimeA for UFS health */ 292 optional int32 lifetime_a = 2; 293 /* The value of lifetimeB for UFS health */ 294 optional int32 lifetime_b = 3; 295 /* The value of lifetimeC for UFS health */ 296 optional int32 lifetime_c = 4; 297} 298 299/* A message containing filesystem stats of F2FS */ 300message F2fsStatsInfo { 301 optional string reverse_domain_name = 1; 302 /* The value of dirty segments of f2fs */ 303 optional int32 dirty_segments = 2; 304 /* The value of free segments of f2fs */ 305 optional int32 free_segments = 3; 306 /* The times of checkpoint function called in foreground*/ 307 optional int32 cp_calls_fg = 4; 308 /* The times of checkpoint function called in background */ 309 optional int32 cp_calls_bg = 5; 310 /* The times of garbage collection function called in foreground */ 311 optional int32 gc_calls_fg = 6; 312 /* The times of garbage collection function called in background */ 313 optional int32 gc_calls_bg = 7; 314 /* The amount of blocks been moved by garbage collection in foreground */ 315 optional int32 moved_blocks_fg = 8; 316 /* The amount of blocks been moved by garbage collection in background */ 317 optional int32 moved_blocks_bg = 9; 318 /* The average of how many valid blocks is in a segment */ 319 optional int32 valid_blocks = 10; 320} 321 322message ZramMmStat { 323 optional string reverse_domain_name = 1; 324 /* The value of original memory size */ 325 optional int64 orig_data_size = 2; 326 /* The value of compressed memory size */ 327 optional int64 compr_data_size = 3; 328 /* The value of consumed memory size to store compressed memory */ 329 optional int64 mem_used_total = 4; 330 /* The value of number of page filled with same elements data */ 331 optional int64 same_pages = 5; 332 /* The value of number of incompressible page */ 333 optional int64 huge_pages = 6; 334 /* The value of number of incompressible pages since boot */ 335 optional int64 huge_pages_since_boot = 7; 336} 337 338message ZramBdStat { 339 optional string reverse_domain_name = 1; 340 /* the number of pages in backing device */ 341 optional int64 bd_count = 2; 342 /* The number of pages readed from backing device */ 343 optional int64 bd_reads = 3; 344 /* The number of pages written to backing device */ 345 optional int64 bd_writes = 4; 346} 347 348/* A message containing boot times */ 349message BootStatsInfo { 350 optional string reverse_domain_name = 1; 351 /* The F2FS fsck time in secs */ 352 optional int32 fsck_time_sec = 2; 353 /* The F2FS mounted time in secs */ 354 optional int32 mounted_time_sec = 3; 355 /* The F2FS checkpoint=disable time in secs */ 356 optional int32 checkpoint_time_sec = 4; 357} 358 359/* A message containing wireless charging health info. */ 360message WirelessChargingStats { 361 /* Captures if a google charger used when start wireless charging */ 362 enum ChargerVendor { 363 VENDOR_UNKNOWN = 0; 364 VENDOR_GOOGLE = 1; 365 } 366 367 optional string reverse_domain_name = 1; 368 optional ChargerVendor charger_vendor = 2; 369} 370 371/* Current device Orientation */ 372message DeviceOrientation { 373 enum Orientation { 374 ORIENTATION_UNKNOWN = 0; 375 ORIENTATION_0 = 1; 376 ORIENTATION_90 = 2; 377 ORIENTATION_180 = 3; 378 ORIENTATION_270 = 4; 379 } 380 381 optional string reverse_domain_name = 1; 382 /* Device orientation. */ 383 optional Orientation orientation = 2; 384} 385 386/* Raw battery capacity stats */ 387message BatteryCapacityFG { 388 enum LogReason { 389 LOG_REASON_UNKNOWN = 0; 390 LOG_REASON_CONNECTED = 1; 391 LOG_REASON_DISCONNECTED = 2; 392 LOG_REASON_FULL_CHARGE = 3; 393 LOG_REASON_PERCENT_SKIP = 4; 394 LOG_REASON_DIVERGING_FG = 5; 395 } 396 397 optional string reverse_domain_name = 1; 398 /* Uevent logging reason, enumerated above. */ 399 optional LogReason capacity_log_reason = 2; 400 401 /* The battery capacity reported from the FG (fuel gauge) hardware */ 402 optional float capacity_gdf = 3; 403 /* The filtered system battery capacity reported to the UI */ 404 optional float capacity_ssoc = 4; 405 /* The fuel gauge capacity curve midpoint FG (fuel gauge) value */ 406 optional float capacity_gdf_curve = 5; 407 /* The fuel gauge capacity curve midpoint UI value */ 408 optional float capacity_ssoc_curve = 6; 409} 410 411message PdVidPid { 412 optional string reverse_domain_name = 1; 413 /* Vendor ID of wired charger */ 414 optional int32 vid = 2; 415 /* Product ID of wired charger */ 416 optional int32 pid = 3; 417} 418 419message BatteryEEPROM { 420 optional string reverse_domain_name = 1; 421 /* The cycle count number; record of charge/discharge times */ 422 optional int32 cycle_cnt = 2; 423 /* The current full capacity of the battery under nominal conditions */ 424 optional int32 full_cap = 3; 425 /* The battery equivalent series resistance */ 426 optional int32 esr = 4; 427 /* Battery resistance related to temperature change */ 428 optional int32 rslow = 5; 429 /* Battery health indicator reflecting the battery age state */ 430 optional int32 soh = 6; 431 /* The battery temperature */ 432 optional int32 batt_temp = 7; 433 434 /* Battery state of charge (SOC) shutdown point */ 435 optional int32 cutoff_soc = 8; 436 /* Raw battery state of charge (SOC), based on battery current (CC = Coulomb Counter) */ 437 optional int32 cc_soc = 9; 438 /* Estimated battery state of charge (SOC) from batt_soc with endpoint limiting (0% and 100%) */ 439 optional int32 sys_soc = 10; 440 /* Filtered monotonic SOC, handles situations where the cutoff_soc is increased and 441 * then decreased from the battery physical properties 442 */ 443 optional int32 msoc = 11; 444 /* Estimated SOC derived from cc_soc that provides voltage loop feedback correction using 445 * battery voltage, current, and status values 446 */ 447 optional int32 batt_soc = 12; 448 449 /* Field used for data padding in the EEPROM data */ 450 optional int32 reserve = 13; 451 452 /* The maximum battery temperature ever seen */ 453 optional int32 max_temp = 14; 454 /* The minimum battery temperature ever seen */ 455 optional int32 min_temp = 15; 456 /* The maximum battery voltage ever seen */ 457 optional int32 max_vbatt = 16; 458 /* The minimum battery voltage ever seen */ 459 optional int32 min_vbatt = 17; 460 /* The maximum battery current ever seen */ 461 optional int32 max_ibatt = 18; 462 /* The minimum battery current ever seen */ 463 optional int32 min_ibatt = 19; 464 /* Field used to verify the integrity of the EEPROM data */ 465 optional int32 checksum = 20; 466 467 /* Extend data for P21 */ 468 /* Temperature compensation information */ 469 optional int32 tempco = 21; 470 /* Learned characterization related to the voltage gauge */ 471 optional int32 rcomp0 = 22; 472 /* For time to monitor the life of cell */ 473 optional int32 timer_h = 23; 474 /* The full capacity of the battery learning at the end of every charge cycle */ 475 optional int32 full_rep = 24; 476} 477 478/* A message containing an exceptional event from citadel. */ 479message CitadelEvent { 480 enum Event { 481 ALERT = 1; 482 REBOOTED = 2; 483 UPGRADED = 3; 484 ALERT_V2 = 4; 485 SEC_CH_STATE = 5; 486 }; 487 optional string reverse_domain_name = 1; 488 optional Event event = 2; 489 optional int32 reset_count = 3; 490 optional int64 uptime_micros = 4; 491 enum Priority { 492 LOW = 0; 493 MEDIUM = 1; 494 HIGH = 2; 495 }; 496 optional Priority priority = 5; 497 498 // ALERT-specific fields. These fields correspond to the interrupt status 499 // bits for alerts within citadel. When alerts fire one or more of these 500 // bits are set to indicate the alert source. 501 optional int32 intr_sts_0 = 6; 502 optional int32 intr_sts_1 = 7; 503 optional int32 intr_sts_2 = 8; 504 505 // REBOOTED-specific fields. These fields correspond to the details of how 506 // the hardware reboot occurred. A reboot is a noteworthy event for citadel, 507 // as it can be triggered by events like stack overflow or other software 508 // bugs. 509 optional int32 rstsrc = 9; 510 optional int32 exitpd = 10; 511 optional int32 which0 = 11; 512 optional int32 which1 = 12; 513 514 // UPGRADED-specific field. This field corresponds to the result of FW 515 // upgrade for citadel. 516 optional int32 upgrade_state = 13; 517 518 // ALERT_V2-specific field. This field corresponds to the GLOBALSEC Log 519 // which contains normal globalsec, camo, temp and buserr. 520 optional int32 alert_grp_0 = 14; 521 optional int32 alert_grp_1 = 15; 522 optional int32 alert_grp_2 = 16; 523 optional int32 alert_grp_3 = 17; 524 optional int32 camo_breaches_0 = 18; 525 optional int32 camo_breaches_1 = 19; 526 optional int32 temp_min = 20; 527 optional int32 temp_max = 21; 528 optional int32 bus_err = 22; 529 530 // SEC_CH_STATE-specific filed. This field corresponds to the state 531 // of GSA-GSC secure channel. 532 optional int32 sec_ch_state = 23; 533} 534 535/* A message containing the citadel firmware version. */ 536message CitadelVersion { 537 optional string reverse_domain_name = 1; 538 optional string version = 2; 539} 540 541/* A message containing the speaker impedance. */ 542 message VendorSpeakerImpedance { 543 optional string reverse_domain_name = 1; 544 optional int32 speaker_location = 2; 545 optional int32 impedance = 3; 546} 547 548/** 549 * Logs the reported vendor speaker health stats. 550 * Logged from: hardware/google/pixel/pixelstats/SysfsCollector.cpp 551 */ 552message VendorSpeakerStatsReported { 553 /* Vendor reverse domain name (expecting "com.google.pixel") */ 554 optional string reverse_domain_name = 1; 555 /* The location of speaker; 0 = left , 1 = right */ 556 optional int32 speaker_location = 2; 557 /* The speaker's impedance value (milliOhm) */ 558 optional int32 impedance = 3; 559 /* The speaker's maximum temperature (milliDegree C) */ 560 optional int32 max_temperature = 4; 561 /* The speaker's execursion length (micrometer) */ 562 optional int32 excursion = 5; 563 /* The speaker's heart beat count */ 564 optional int32 heartbeat = 6; 565 /* The speaker's version */ 566 optional int32 version = 7; 567} 568 569/* A message containing how many times of ufs host reset */ 570message StorageUfsResetCount { 571 optional string reverse_domain_name = 1; 572 /* How many UFS error reset are triggered */ 573 optional int32 host_reset_count = 2; 574} 575 576/* A message containing Pixel memory metrics collected hourly. */ 577message PixelMmMetricsPerHour { 578 optional string reverse_domain_name = 1; 579 optional int64 free_pages = 2; 580 optional int64 anon_pages = 3; 581 optional int64 file_pages = 4; 582 optional int64 slab_reclaimable = 5; 583 optional int64 zspages = 6; 584 optional int64 unevictable = 7; 585 optional int64 ion_total_pools = 8; 586 optional int64 gpu_memory = 9; 587 optional int64 slab_unreclaimable = 10; 588 optional int64 psi_cpu_some_total = 11; 589 optional int64 psi_io_full_total = 12; 590 optional int64 psi_io_some_total = 13; 591 optional int64 psi_mem_full_total = 14; 592 optional int64 psi_mem_some_total = 15; 593 optional int32 psi_cpu_some_avg10_min = 16; 594 optional int32 psi_cpu_some_avg10_max = 17; 595 optional int32 psi_cpu_some_avg10_avg = 18; 596 optional int32 psi_cpu_some_avg60_min = 19; 597 optional int32 psi_cpu_some_avg60_max = 20; 598 optional int32 psi_cpu_some_avg60_avg = 21; 599 optional int32 psi_cpu_some_avg300_min = 22; 600 optional int32 psi_cpu_some_avg300_max = 23; 601 optional int32 psi_cpu_some_avg300_avg = 24; 602 optional int32 psi_io_full_avg10_min = 25; 603 optional int32 psi_io_full_avg10_max = 26; 604 optional int32 psi_io_full_avg10_avg = 27; 605 optional int32 psi_io_full_avg60_min = 28; 606 optional int32 psi_io_full_avg60_max = 29; 607 optional int32 psi_io_full_avg60_avg = 30; 608 optional int32 psi_io_full_avg300_min = 31; 609 optional int32 psi_io_full_avg300_max = 32; 610 optional int32 psi_io_full_avg300_avg = 33; 611 optional int32 psi_io_some_avg10_min = 34; 612 optional int32 psi_io_some_avg10_max = 35; 613 optional int32 psi_io_some_avg10_avg = 36; 614 optional int32 psi_io_some_avg60_min = 37; 615 optional int32 psi_io_some_avg60_max = 38; 616 optional int32 psi_io_some_avg60_avg = 39; 617 optional int32 psi_io_some_avg300_min = 40; 618 optional int32 psi_io_some_avg300_max = 41; 619 optional int32 psi_io_some_avg300_avg = 42; 620 optional int32 psi_mem_full_avg10_min = 43; 621 optional int32 psi_mem_full_avg10_max = 44; 622 optional int32 psi_mem_full_avg10_avg = 45; 623 optional int32 psi_mem_full_avg60_min = 46; 624 optional int32 psi_mem_full_avg60_max = 47; 625 optional int32 psi_mem_full_avg60_avg = 48; 626 optional int32 psi_mem_full_avg300_min = 49; 627 optional int32 psi_mem_full_avg300_max = 50; 628 optional int32 psi_mem_full_avg300_avg = 51; 629 optional int32 psi_mem_some_avg10_min = 52; 630 optional int32 psi_mem_some_avg10_max = 53; 631 optional int32 psi_mem_some_avg10_avg = 54; 632 optional int32 psi_mem_some_avg60_min = 55; 633 optional int32 psi_mem_some_avg60_max = 56; 634 optional int32 psi_mem_some_avg60_avg = 57; 635 optional int32 psi_mem_some_avg300_min = 58; 636 optional int32 psi_mem_some_avg300_max = 59; 637 optional int32 psi_mem_some_avg300_avg = 60; 638 optional int32 version = 61 [deprecated = true]; 639 optional int64 shmem_pages = 62; 640 optional int64 page_table_pages = 63; 641 optional int64 dmabuf_kb = 64; 642} 643 644/* A message containing Pixel memory metrics collected daily. */ 645message PixelMmMetricsPerDay { 646 optional string reverse_domain_name = 1; 647 optional int64 workingset_refault = 2; /* refault_file */ 648 optional int64 pswpin = 3; 649 optional int64 pswpout = 4; 650 optional int64 allocstall_dma = 5; 651 optional int64 allocstall_dma32 = 6; 652 optional int64 allocstall_normal = 7; 653 optional int64 allocstall_movable = 8; 654 optional int64 pgalloc_dma = 9; 655 optional int64 pgalloc_dma32 = 10; 656 optional int64 pgalloc_normal = 11; 657 optional int64 pgalloc_movable = 12; 658 optional int64 pgsteal_kswapd = 13; 659 optional int64 pgsteal_direct = 14; 660 optional int64 pgscan_kswapd = 15; 661 optional int64 pgscan_direct = 16; 662 optional int64 oom_kill = 17; 663 optional int64 pgalloc_high = 18; 664 optional int64 pgcache_hit = 19; 665 optional int64 pgcache_miss = 20; 666 optional int64 kswapd_stime_clks = 21; 667 optional int64 kcompactd_stime_clks = 22; 668 optional int64 direct_reclaim_native_latency_total_time = 23; 669 optional int64 direct_reclaim_native_latency0 = 24; 670 optional int64 direct_reclaim_native_latency1 = 25; 671 optional int64 direct_reclaim_native_latency2 = 26; 672 optional int64 direct_reclaim_native_latency3 = 27; 673 optional int64 direct_reclaim_visible_latency_total_time = 28; 674 optional int64 direct_reclaim_visible_latency0 = 29; 675 optional int64 direct_reclaim_visible_latency1 = 30; 676 optional int64 direct_reclaim_visible_latency2 = 31; 677 optional int64 direct_reclaim_visible_latency3 = 32; 678 optional int64 direct_reclaim_top_latency_total_time = 33; 679 optional int64 direct_reclaim_top_latency0 = 34; 680 optional int64 direct_reclaim_top_latency1 = 35; 681 optional int64 direct_reclaim_top_latency2 = 36; 682 optional int64 direct_reclaim_top_latency3 = 37; 683 optional int64 direct_reclaim_other_latency_total_time = 38; 684 optional int64 direct_reclaim_other_latency0 = 39; 685 optional int64 direct_reclaim_other_latency1 = 40; 686 optional int64 direct_reclaim_other_latency2 = 41; 687 optional int64 direct_reclaim_other_latency3 = 42; 688 optional int64 compaction_total_time = 43; 689 optional int64 compaction_ev_count0 = 44; 690 optional int64 compaction_ev_count1 = 45; 691 optional int64 compaction_ev_count2 = 46; 692 optional int64 compaction_ev_count3 = 47; 693 optional int64 compaction_ev_count4 = 48; 694 optional int64 workingset_refault_anon = 49; 695 optional int64 workingset_refault_file = 50; 696 optional int64 compact_success = 51; 697 optional int64 compact_fail = 52; 698 optional int64 kswapd_low_wmark_hq = 53; 699 optional int64 kswapd_high_wmark_hq = 54; 700 optional int64 thp_file_alloc = 55; 701 optional int64 thp_zero_page_alloc = 56; 702 optional int64 thp_split_page = 57; 703 optional int64 thp_migration_split = 58; 704 optional int64 thp_deferred_split_page = 59; 705 optional int64 version = 60 [deprecated = true]; 706 optional int64 cpu_total_time_cs = 61; 707 optional int64 cpu_idle_time_cs = 62; 708 optional int64 cpu_io_wait_time_cs = 63; 709 optional int64 kswapd_pageout_run = 64; 710} 711 712/* A message containing CMA metrics collected from dogfooding only. */ 713message CmaStatus { 714 optional string reverse_domain_name = 1; 715 optional int32 type = 2; 716 optional int64 cma_alloc_pages_attempts = 3; 717 optional int64 cma_alloc_pages_soft_attempts = 4; 718 optional int64 cma_fail_pages = 5; 719 optional int64 cma_fail_soft_pages = 6; 720 optional int64 migrated_pages = 7; 721 optional string cma_heap_name = 8; 722} 723 724/* A message containing CMA metrics (External). */ 725message CmaStatusExt { 726 optional string reverse_domain_name = 1; 727 optional int32 type = 2; 728 optional int64 cma_alloc_latency_low = 3; 729 optional int64 cma_alloc_latency_mid = 4; 730 optional int64 cma_alloc_latency_high = 5; 731 optional string cma_heap_name = 6; 732} 733 734message F2fsCompressionInfo { 735 optional string reverse_domain_name = 1; 736 /* Show the block count written after compression since mount */ 737 optional int32 compr_written_blocks = 2; 738 /* Show the saved block count with compression since mount */ 739 optional int32 compr_saved_blocks = 3; 740 /* Show the count of inode newly enabled for compression since mount */ 741 optional int32 compr_new_inodes = 4; 742} 743 744/** 745 * Log bucketed battery charge cycles. 746 * 747 * Each bucket represents cycles of the battery past 748 * a given charge point. For example, bucket 1 is the 749 * lowest 1/8th of the battery, and bucket 8 is 100%. 750 * 751 * Logged from: 752 * /sys/class/power_supply/bms/cycle_count, via Vendor. 753 */ 754message VendorChargeCycles { 755 optional string reverse_domain_name = 1; 756 optional int32 cycle_bucket_1 = 2; 757 optional int32 cycle_bucket_2 = 3; 758 optional int32 cycle_bucket_3 = 4; 759 optional int32 cycle_bucket_4 = 5; 760 optional int32 cycle_bucket_5 = 6; 761 optional int32 cycle_bucket_6 = 7; 762 optional int32 cycle_bucket_7 = 8; 763 optional int32 cycle_bucket_8 = 9; 764 optional int32 cycle_bucket_9 = 10; 765 optional int32 cycle_bucket_10 = 11; 766} 767 768/** 769 * Logs the report of a failed hardware. 770 * 771 * Logged from: 772 * Vendor HALs. 773 * 774 */ 775message VendorHardwareFailed { 776 enum HardwareType { 777 HARDWARE_FAILED_UNKNOWN = 0; 778 HARDWARE_FAILED_MICROPHONE = 1; 779 HARDWARE_FAILED_CODEC = 2; 780 HARDWARE_FAILED_SPEAKER = 3; 781 HARDWARE_FAILED_FINGERPRINT = 4; 782 } 783 optional string reverse_domain_name = 1; 784 optional HardwareType hardware_type = 2; 785 786 /** 787 * hardware_location allows vendors to differentiate between multiple 788 * instances of the same hardware_type. The specific locations are vendor 789 * defined integers, referring to board-specific numbering schemes. 790 */ 791 optional int32 hardware_location = 3; 792 /** 793 * failure_code is specific to the HardwareType of the failed hardware. 794 * It should use one of the enum values defined below. 795 */ 796 enum HardwareErrorCode { 797 UNKNOWN = 0; 798 COMPLETE = 1; 799 SPEAKER_HIGH_Z = 2; 800 SPEAKER_SHORT = 3; 801 FINGERPRINT_SENSOR_BROKEN = 4; 802 FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; 803 DEGRADE = 6; 804 } 805 optional int32 failure_code = 4; 806} 807 808/** 809 * Log slow I/O operations on the primary storage. 810 */ 811message VendorSlowIo { 812 // Classifications of IO Operations. 813 enum IoOperation { 814 UNKNOWN = 0; 815 READ = 1; 816 WRITE = 2; 817 UNMAP = 3; 818 SYNC = 4; 819 } 820 optional string reverse_domain_name = 1; 821 optional IoOperation operation = 2; 822 823 // The number of slow IO operations of this type over 24 hours. 824 optional int32 count = 3; 825} 826 827/* 828 * Logs the reported speech DSP status. 829 * Logged from: Vendor audio implementation. 830 */ 831message VendorSpeechDspStat { 832 optional string reverse_domain_name = 1; 833 // The total Speech DSP uptime in milliseconds. 834 optional int32 total_uptime_millis = 2; 835 // The total Speech DSP downtime in milliseconds. 836 optional int32 total_downtime_millis = 3; 837 optional int32 total_crash_count = 4; 838 optional int32 total_recover_count = 5; 839} 840 841/** 842 * Log an event when the device has been physically dropped. 843 * Reported from the /vendor partition. 844 */ 845message VendorPhysicalDropDetected { 846 optional string reverse_domain_name = 1; 847 // Confidence that the event was actually a drop, 0 -> 100 848 optional int32 confidence_pctg = 2; 849 // Peak acceleration of the drop, in 1/1000s of a g. 850 optional int32 accel_peak_thousandths_g = 3; 851 // Duration of freefall in ms 852 optional int32 freefall_time_millis = 4; 853} 854 855/** Represents USB port overheat event. */ 856message VendorUsbPortOverheat { 857 optional string reverse_domain_name = 1; 858 /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ 859 optional int32 plug_temperature_deci_c = 2; 860 /* Maximum temperature of USB port during overheat event, in 1/10ths of degree 861 * C. */ 862 optional int32 max_temperature_deci_c = 3; 863 /* Time between USB plug event and overheat threshold trip, in seconds. */ 864 optional int32 time_to_overheat_secs = 4; 865 /* Time between overheat threshold trip and hysteresis, in seconds. */ 866 optional int32 time_to_hysteresis_secs = 5; 867 /* Time between hysteresis and active mitigation ending, in seconds. */ 868 optional int32 time_to_inactive_secs = 6; 869} 870 871/** 872 * Log battery health snapshot. 873 * 874 * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level 875 * are snapshotted periodically over 24hrs. 876 */ 877message VendorBatteryHealthSnapshot { 878 enum BatterySnapshotType { 879 BATTERY_SNAPSHOT_TYPE_UNKNOWN = 0; 880 BATTERY_SNAPSHOT_TYPE_MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. 881 BATTERY_SNAPSHOT_TYPE_MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. 882 BATTERY_SNAPSHOT_TYPE_MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. 883 BATTERY_SNAPSHOT_TYPE_MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. 884 BATTERY_SNAPSHOT_TYPE_MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. 885 BATTERY_SNAPSHOT_TYPE_MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. 886 BATTERY_SNAPSHOT_TYPE_MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. 887 BATTERY_SNAPSHOT_TYPE_MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. 888 BATTERY_SNAPSHOT_TYPE_MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. 889 BATTERY_SNAPSHOT_TYPE_MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. 890 BATTERY_SNAPSHOT_TYPE_AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. 891 } 892 optional string reverse_domain_name = 1; 893 optional BatterySnapshotType type = 2; 894 // Temperature, in 1/10ths of degree C. 895 optional int32 temperature_deci_celsius = 3; 896 // Voltage Battery Voltage, in microVolts. 897 optional int32 voltage_micro_volt = 4; 898 // Current Battery current, in microAmps. 899 optional int32 current_micro_amps = 5; 900 // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. 901 optional int32 open_circuit_micro_volt = 6; 902 // Resistance Battery Resistance, in microOhms. 903 optional int32 resistance_micro_ohm = 7; 904 // Level Battery Level, as % of full. 905 optional int32 level_percent = 8; 906} 907 908/** 909 * Log battery caused shutdown with the last recorded voltage. 910 */ 911message VendorBatteryCausedShutdown { 912 optional string reverse_domain_name = 1; 913 // The last recorded battery voltage prior to shutdown. 914 optional int32 last_recorded_micro_volt = 2; 915} 916 917/** 918 * Log mitigation statistics. 919 */ 920message PowerMitigationStats { 921 optional string reverse_domain_name = 1; 922 // The last triggered count: batoilo. 923 optional int32 batoilo_count = 2; 924 // The last triggered count: vdroop1. 925 optional int32 vdroop1_count = 3; 926 // The last triggered count: vdroop2. 927 optional int32 vdroop2_count = 4; 928 // The last triggered count: smpl_warn. 929 optional int32 smpl_warn_count = 5; 930 // The last triggered count: ocp_cpu1. 931 optional int32 ocp_cpu1_count = 6; 932 // The last triggered count: ocp_cpu2. 933 optional int32 ocp_cpu2_count = 7; 934 // The last triggered count: ocp_gpu. 935 optional int32 ocp_gpu_count = 8; 936 // The last triggered count: ocp_tpu. 937 optional int32 ocp_tpu_count = 9; 938 // The last triggered count: soft_ocp_cpu1. 939 optional int32 soft_ocp_cpu1_count = 10; 940 // The last triggered count: soft_ocp_cpu2. 941 optional int32 soft_ocp_cpu2_count = 11; 942 // The last triggered count: soft_ocp_gpu. 943 optional int32 soft_ocp_gpu_count = 12; 944 // The last triggered count: soft_ocp_tpu. 945 optional int32 soft_ocp_tpu_count = 13; 946 // The last triggered capacity: batoilo. 947 optional int32 batoilo_cap = 14; 948 // The last triggered capacity: vdroop1. 949 optional int32 vdroop1_cap = 15; 950 // The last triggered capacity: vdroop2. 951 optional int32 vdroop2_cap = 16; 952 // The last triggered capacity: smpl_warn. 953 optional int32 smpl_warn_cap = 17; 954 // The last triggered capacity: ocp_cpu1. 955 optional int32 ocp_cpu1_cap = 18; 956 // The last triggered capacity: ocp_cpu2. 957 optional int32 ocp_cpu2_cap = 19; 958 // The last triggered capacity: ocp_gpu. 959 optional int32 ocp_gpu_cap = 20; 960 // The last triggered capacity: ocp_tpu. 961 optional int32 ocp_tpu_cap = 21; 962 // The last triggered capacity: soft_ocp_cpu1. 963 optional int32 soft_ocp_cpu1_cap = 22; 964 // The last triggered capacity: soft_ocp_cpu2. 965 optional int32 soft_ocp_cpu2_cap = 23; 966 // The last triggered capacity: soft_ocp_gpu. 967 optional int32 soft_ocp_gpu_cap = 24; 968 // The last triggered capacity: soft_ocp_tpu. 969 optional int32 soft_ocp_tpu_cap = 25; 970 // The last triggered count: batoilo2. 971 optional int32 batoilo2_count = 26; 972 // The last triggered capacity: batoilo2. 973 optional int32 batoilo2_cap = 27; 974} 975 976/** 977 * Log thermal statistics. 978 */ 979message ThermalDfsStats { 980 optional string reverse_domain_name = 1; 981 // The last count of BIG cluster dfs triggers 982 optional int32 big_dfs_count = 2; 983 // The last count of MID cluster dfs triggers 984 optional int32 mid_dfs_count = 3; 985 // The last count of LITTLE cluster dfs triggers 986 optional int32 little_dfs_count = 4; 987 // The last count of GPU dfs triggers 988 optional int32 gpu_dfs_count = 5; 989 // The last count of TPU dfs triggers 990 optional int32 tpu_dfs_count = 6; 991 // The last count of DSP dfs triggers 992 optional int32 aur_dfs_count = 7; 993} 994 995/** 996 * Log Display Panel error statistics. 997 */ 998message DisplayPanelErrorStats { 999 optional string reverse_domain_name = 1; 1000 // The error count due to Tear Effect on primary display panel. 1001 optional int32 primary_error_count_te = 2; 1002 // The error count due to unknown reason on primary display panel. 1003 optional int32 primary_error_count_unknown = 3; 1004 // The error count due to Tear Effect on primary display panel. 1005 optional int32 secondary_error_count_te = 4; 1006 // The error count due to unknown reason on secondary display panel. 1007 optional int32 secondary_error_count_unknown = 5; 1008} 1009 1010/** 1011 * Log how many segments have been reclaimed in a specific GC mode. 1012 */ 1013message F2fsGcSegmentInfo { 1014 optional string reverse_domain_name = 1; 1015 /* Reclaimed segments in GC normal mode */ 1016 optional int32 reclaimed_segments_normal = 2; 1017 /* Reclaimed segments in GC urgent high mode */ 1018 optional int32 reclaimed_segments_urgent_high = 3; 1019 /* Reclaimed segments in GC urgent low mode */ 1020 optional int32 reclaimed_segments_urgent_low = 4; 1021 /* Reclaimed segments in GC urgent mid mode */ 1022 optional int32 reclaimed_segments_urgent_mid = 5; 1023} 1024 1025/** 1026 * Logs an event indicating that a nanoapp loading has failed at the HAL. 1027 */ 1028message ChreHalNanoappLoadFailed { 1029 // Vendor reverse domain name (expecting "com.google.pixel"). 1030 optional string reverse_domain_name = 1; 1031 1032 enum Type { 1033 TYPE_UNKNOWN = 0; 1034 // Corresponds to preloaded nanoapps on the device. 1035 TYPE_PRELOADED = 1; 1036 // Dynamic loading of a nanoapp (e.g. code download). 1037 TYPE_DYNAMIC = 2; 1038 } 1039 1040 enum Reason { 1041 REASON_UNKNOWN = 0; 1042 // A generic error code that does not match any of the others. 1043 REASON_ERROR_GENERIC = 1; 1044 // Failure at the connection between HAL<->CHRE. 1045 REASON_CONNECTION_ERROR = 2; 1046 // System ran out of memory. 1047 REASON_OOM = 3; 1048 // Nanoapp did not have the right signing for loading. 1049 REASON_SIGNATURE_MISMATCH = 4; 1050 } 1051 1052 // The 64-bit unique nanoapp identifier of the nanoapp that failed. 1053 optional int64 nanoapp_id = 2; 1054 1055 // The type of the load event. 1056 optional Type type = 3; 1057 1058 // The reason for the failure. 1059 optional Reason reason = 4; 1060} 1061 1062/** 1063 * An enum describing a module within CHRE. 1064 */ 1065enum ChreModuleType { 1066 CHRE_MODULE_TYPE_UNKNOWN = 0; 1067 CHRE_MODULE_TYPE_CHRE = 1; // Core CHRE framework 1068 CHRE_MODULE_TYPE_PAL = 2; // PAL module (could be CHPP) 1069 CHRE_MODULE_TYPE_NANOAPP = 3; 1070} 1071 1072/** 1073 * An enum describing the CHRE PAL type. 1074 */ 1075enum ChrePalType { 1076 CHRE_PAL_TYPE_UNKNOWN = 0; 1077 CHRE_PAL_TYPE_SENSOR = 1; 1078 CHRE_PAL_TYPE_WIFI = 2; 1079 CHRE_PAL_TYPE_GNSS = 3; 1080 CHRE_PAL_TYPE_WWAN = 4; 1081 CHRE_PAL_TYPE_AUDIO = 5; 1082 CHRE_PAL_TYPE_BLE = 6; 1083} 1084 1085/** 1086 * Logs an event indicating that a CHRE PAL open has failed. 1087 */ 1088message ChrePalOpenFailed { 1089 // Vendor reverse domain name (expecting "com.google.pixel"). 1090 optional string reverse_domain_name = 1; 1091 1092 enum Type { 1093 TYPE_UNKNOWN = 0; 1094 // Initial open when CHRE starts. 1095 INITIAL_OPEN = 1; 1096 // Any form of "reopen" event internally in the PAL. 1097 REOPEN = 2; 1098 } 1099 1100 // The PAL this failure event is for. 1101 optional ChrePalType pal = 2; 1102 1103 // The type of failure observed. 1104 optional Type type = 3; 1105} 1106 1107/** 1108 * The type of CHRE API request. 1109 */ 1110enum ChreApiType { 1111 CHRE_API_TYPE_UNKNOWN = 0; 1112 CHRE_API_TYPE_WIFI_SCAN_MONITOR = 1; 1113 CHRE_API_TYPE_WIFI_ACTIVE_SCAN = 2; 1114 CHRE_API_TYPE_WIFI_RTT_RANGING = 3; 1115} 1116 1117/** 1118 * The type of CHRE API error. 1119 */ 1120enum ChreError { 1121 CHRE_ERROR_UNKNOWN = 0; 1122 1123 // No error occurred. 1124 CHRE_ERROR_NONE = 1; 1125 1126 // An unspecified failure occurred. 1127 CHRE_ERROR = 2; 1128 1129 // One or more supplied arguments are invalid. 1130 CHRE_ERROR_INVALID_ARGUMENT = 3; 1131 1132 // Unable to satisfy request because the system is busy. 1133 CHRE_ERROR_BUSY = 4; 1134 1135 // Unable to allocate memory. 1136 CHRE_ERROR_NO_MEMORY = 5; 1137 1138 // The requested feature is not supported. 1139 CHRE_ERROR_NOT_SUPPORTED = 6; 1140 1141 // A timeout occurred while processing the request. 1142 CHRE_ERROR_TIMEOUT = 7; 1143 1144 // The relevant capability is disabled, for example due to a user 1145 // configuration that takes precedence over this request. 1146 CHRE_ERROR_FUNCTION_DISABLED = 8; 1147} 1148 1149/** 1150 * Distribution of CHRE API error codes. 1151 */ 1152message ChreApiErrorCodeDistributionTaken { 1153 // Vendor reverse domain name (expecting "com.google.pixel"). 1154 optional string reverse_domain_name = 1; 1155 1156 // The chreGetTime() value when this snapshot was taken, in milliseconds. 1157 optional int32 snapshot_chre_get_time_ms = 2; 1158 1159 // The CHRE API type. 1160 optional ChreApiType api_type = 3; 1161 1162 // Corresponds to the CHRE error code that occurred, as defined in the 1163 // "enum chreError" field in chre_api/chre/common.h. 1164 optional ChreError error_code = 4; 1165 optional int32 num_errors = 5; 1166} 1167 1168/** 1169 * Snapshot of the dynamic memory allocated in CHRE. 1170 */ 1171message ChreDynamicMemorySnapshotReported { 1172 // Vendor reverse domain name (expecting "com.google.pixel"). 1173 optional string reverse_domain_name = 1; 1174 1175 // The chreGetTime() value when this snapshot was taken, in milliseconds. 1176 optional int32 snapshot_chre_get_time_ms = 2; 1177 1178 // The type of the module. 1179 optional ChreModuleType module_type = 3; 1180 1181 // The unique 64-bit ID for a nanoapp, only used if the module_type is NANOAPP. 1182 // If module_type is PAL, then it represents the ChrePalType enum. If the module_type 1183 // is CHRE, then a zero value should be used. 1184 optional int64 pal_type_or_nanoapp_id = 4; 1185 1186 // The max allocation amount of this module in bytes. 1187 optional int32 max_allocation_bytes = 5; 1188 1189 // The current allocation amount of this module in bytes. 1190 optional int32 current_allocation_bytes = 6; 1191} 1192 1193/** 1194 * Snapshot of the event queue stats in CHRE. 1195 */ 1196message ChreEventQueueSnapshotReported { 1197 // Vendor reverse domain name (expecting "com.google.pixel"). 1198 optional string reverse_domain_name = 1; 1199 1200 // The chreGetTime() value when this snapshot was taken, in milliseconds. 1201 optional int32 snapshot_chre_get_time_ms = 2; 1202 1203 // The maximum size the event queue got to (i.e. num pending events). 1204 optional int32 max_event_queue_size = 3; 1205 1206 // The average size the event queue got to (i.e. num pending events). 1207 optional int32 mean_event_queue_size = 4; 1208 1209 // The number of events that were dropped due to capacity limits. 1210 optional int32 num_dropped_events = 5; 1211 1212 // The maximum amount of time it took for an event, from when it was received, 1213 // to when it was delivered to all interested modules. This value represents 1214 // the total delay within the CHRE subsystem. 1215 optional int64 max_queue_delay_us = 6; 1216 1217 // The mean value of the delay in microseconds. 1218 optional int64 mean_queue_delay_us = 7; 1219} 1220 1221/** 1222 * Indicates that a nanoapp has woken up the AP. 1223 */ 1224message ChreApWakeUpOccurred { 1225 // Vendor reverse domain name (expecting "com.google.pixel"). 1226 optional string reverse_domain_name = 1; 1227 1228 // The 64-bit unique nanoapp identifier that describes the entity that has caused an AP wake-up 1229 // from CHRE. Whenever this event occurs, this means that the nanoapp sent a message to 1230 // the AP causing a transition between suspend/wake-up. 1231 optional int64 nanoapp_id = 2; 1232} 1233 1234/** 1235 * Snapshot of the current battery health of the device. 1236 */ 1237message BatteryHealthStatus { 1238 // Vendor reverse domain name (expecting "com.google.pixel"). 1239 optional string reverse_domain_name = 1; 1240 1241 // The algorithm that computes how the health status and health indexes are calculated. 1242 optional int32 health_algorithm = 2; 1243 1244 enum HealthStatus { 1245 UNKNOWN = -1; // The health status is unknown due to a SW limitation or issue 1246 NOMINAL = 0; // The battery is operating as expected 1247 MARGINAL = 1; // The battery may need replacement soon 1248 NEEDS_REPLACEMENT = 2; // The battery needs replacement 1249 FAILED = 3; // The battery has failed and no longer operates as expected 1250 NOT_AVAILABLE = 4; // This is a temporary state when cycle count is insufficient 1251 INCONSISTENT = 5; // The battery recalibration is pending 1252 } 1253 1254 // HealthStatus calculated using health_index, health_perf_index. 1255 optional HealthStatus health_status = 3; 1256 1257 // A percentage measure of the health of the battery with 100% being perfectly healthy. 1258 optional int32 health_index = 4; 1259 1260 // A percentage measure of the battery capacity of the device, affected by cycle life degradation. 1261 optional int32 health_capacity_index = 5; 1262 1263 // A percentage measure of the max performance of the device, affected by impedance growth with 100% being perfectly healthy. 1264 optional int32 health_impedance_index = 6; 1265 1266 // An index that expresses the likelihood of swelling given the SOC residency stats. 1267 optional int32 swelling_cumulative = 7; 1268 1269 // The battery capacity used to determine the health index. This is the reference value from b/223759710. 1270 optional int32 health_full_capacity = 8; 1271 1272 // 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. 1273 optional int32 current_impedance = 9; 1274 1275 // The (hours) value of TimeH (0xb3), a register value, multiplied by 3.2 hours. 1276 optional int32 battery_age = 10; 1277 1278 // The cycle count at the time of the log event. 1279 optional int32 cycle_count = 11; 1280 1281 enum BattDisconnectStatus { 1282 BPST_BATT_UNKNOWN = 0; 1283 BPST_BATT_CONNECT = 1; 1284 BPST_BATT_DISCONNECT = 2; // Result of single battery disconnect detection 1285 BPST_BATT_CELL_FAULT = 3; // Result of cell fault detection which means actual disconnection 1286 } 1287 1288 // Battery disconnect detection stats. 1289 optional BattDisconnectStatus battery_disconnect_status = 12; 1290} 1291 1292/** 1293 * Log battery SOC/temperature usage data. 1294 * 1295 * Each data represents cumulative time of the battery 1296 * spent over a specific SOC and over a specific temperature 1297 * while charging and while discharging in seconds. 1298 * 1299 * Logged from: 1300 * /sys/class/power_supply/battery/swelling_data, via Vendor. 1301 */ 1302message BatteryHealthUsage { 1303 // Vendor reverse domain name (expecting "com.google.pixel"). 1304 optional string reverse_domain_name = 1; 1305 1306 // The temperature limit (deg C) used to accumulate the time above this value. 1307 optional int32 temperature_limit_deci_c = 2; 1308 1309 // The SOC limit (%) used to accumulate the time above this value. 1310 optional int32 soc_limit = 3; 1311 1312 // Time (s) accumulated only during charge at the given thresholds. 1313 optional int32 charge_time_secs = 4; 1314 1315 // Time (s) accumulated only during discharge at the given thresholds. 1316 optional int32 discharge_time_secs = 5; 1317} 1318 1319/* 1320 * A Value of F2FS smart idle maintenance feature enabled 1321 */ 1322message F2fsSmartIdleMaintEnabledStateChanged { 1323 optional string reverse_domain_name = 1; 1324 /* Smart idle maint is enabled */ 1325 optional bool enabled = 2; 1326} 1327 1328/* 1329 * Snapshot of the block layer read write stats 1330 */ 1331message BlockStatsReported { 1332 optional string reverse_domain_name = 1; 1333 /* number of read I/Os processed */ 1334 optional int64 read_io = 2; 1335 /* number of sectors read */ 1336 optional int64 read_sectors = 3; 1337 /* total wait time for read requests */ 1338 optional int64 read_ticks = 4; 1339 /* number of write I/Os processed */ 1340 optional int64 write_io = 5; 1341 /* number of sectors written */ 1342 optional int64 write_sectors = 6; 1343 /* total wait time for write requests */ 1344 optional int64 write_ticks = 7; 1345} 1346 1347/** 1348 * Logs the reported vendor audio hardware stats. 1349 */ 1350message VendorAudioHardwareStatsReported { 1351 optional string reverse_domain_name = 1; 1352 /* The number of calls in a day where CCA is active. 1353 * CCA can only be applied under some radio bands. 1354 */ 1355 optional int32 milli_rate_of_ams_per_day = 2; 1356 1357 // cca_active: obsoleted UI enable & algorithm is active (C1) 1358 // replaced by cca_active_count_per_day 1359 optional int32 rate_of_cca_active_per_day = 3 [deprecated = true]; 1360 1361 // cca_enable: obsoleted UI enable & algorithm is inactive field (C2) 1362 // replaced by cca_enable_count_per_day 1363 optional int32 rate_of_cca_enable_per_day = 4 [deprecated = true]; 1364 1365 enum Source { 1366 VOIP = 0; 1367 VOICE = 1; 1368 } 1369 1370 /* source: identify whether this atom is for voice or voip case. */ 1371 optional Source source = 5; 1372 1373 /* total_call_count_per_day: count total number of call per day. */ 1374 optional int32 total_call_count_per_day = 6; 1375 1376 /* cca_active: UI enable & algorithm is active (C1 or C3) */ 1377 optional int32 cca_active_count_per_day = 7; 1378 1379 /* cca_enable: UI enable & algorithm is inactive (C2 or C4) */ 1380 optional int32 cca_enable_count_per_day = 8; 1381} 1382 1383/** 1384 * Logs the reported vendor audio PDM stats. 1385 * PDM stats are used to show background noise level during voice/voip calling. 1386 * Each of the atom will show only one type of background noises. There are at most 4 types. 1387 * Thus, this atoms will be reported at most 4 times to show all types. 1388 */ 1389message VendorAudioPdmStatsReported { 1390 optional string reverse_domain_name = 1; 1391 1392 /* index of the pdm to report. There are 4 pdm instances. So, the value is in the range 1-4 */ 1393 optional int32 pdm_index = 2; 1394 1395 /* State of the pdm to report. There is only two value 1 for good and 0 for bad. */ 1396 optional int32 state = 3; 1397} 1398 1399/* 1400 * Logs vendor stats about long IRQs. 1401 * 1402 * IRQ is considered long when it exceeds a threshold (currently 1 ms). 1403 * Stats include top 5 slowest IRQs: their numbers and the worst latency. 1404 * Stats are reset after every report. 1405 */ 1406message VendorLongIRQStatsReported { 1407 optional string reverse_domain_name = 1; 1408 1409 // Count of long soft IRQ since last report. 1410 optional int64 long_softirq_count = 2; 1411 1412 optional int64 top1_softirq_num = 3; 1413 optional int64 top1_softirq_latency_us = 4; 1414 optional int64 top2_softirq_num = 5; 1415 optional int64 top2_softirq_latency_us = 6; 1416 optional int64 top3_softirq_num = 7; 1417 optional int64 top3_softirq_latency_us = 8; 1418 optional int64 top4_softirq_num = 9; 1419 optional int64 top4_softirq_latency_us = 10; 1420 optional int64 top5_softirq_num = 11; 1421 optional int64 top5_softirq_latency_us = 12; 1422 1423 // Count of long IRQ since last report. 1424 optional int64 long_irq_count = 13; 1425 1426 optional int64 top1_irq_num = 14; 1427 optional int64 top1_irq_latency_us = 15; 1428 optional int64 top2_irq_num = 16; 1429 optional int64 top2_irq_latency_us = 17; 1430 optional int64 top3_irq_num = 18; 1431 optional int64 top3_irq_latency_us = 19; 1432 optional int64 top4_irq_num = 20; 1433 optional int64 top4_irq_latency_us = 21; 1434 optional int64 top5_irq_num = 22; 1435 optional int64 top5_irq_latency_us = 23; 1436 1437 optional int64 storm_irq_top1_num = 24; 1438 optional int64 storm_irq_top1_count = 25; 1439 optional int64 storm_irq_top2_num = 26; 1440 optional int64 storm_irq_top2_count = 27; 1441 optional int64 storm_irq_top3_num = 28; 1442 optional int64 storm_irq_top3_count = 29; 1443 optional int64 storm_irq_top4_num = 30; 1444 optional int64 storm_irq_top4_count = 31; 1445 optional int64 storm_irq_top5_num= 32; 1446 optional int64 storm_irq_top5_count = 33; 1447} 1448 1449/** 1450 * Logs the Temperature residency stats per thermal zone. 1451 */ 1452message VendorTempResidencyStats { 1453 optional string reverse_domain_name = 1; 1454 // Thermal zone name 1455 optional string sensor_name = 2; 1456 1457 // Time since last collect of this thermal zone 1458 optional int64 since_last_update_ms = 3; 1459 1460 // Temperature residency stats is measured by time in ms that a temperature zone's temperature 1461 // lay within some temperature thresholds 1462 // e.g. 1463 // With temperature thresholds predefined as thresholds_i, thresholds_i+1, 1464 // temp_residency_ms_bucket_i measures how much time the sensor lay within this two thresholds 1465 optional int64 temp_residency_ms_bucket_1 = 4; 1466 optional int64 temp_residency_ms_bucket_2 = 5; 1467 optional int64 temp_residency_ms_bucket_3 = 6; 1468 optional int64 temp_residency_ms_bucket_4 = 7; 1469 optional int64 temp_residency_ms_bucket_5 = 8; 1470 optional int64 temp_residency_ms_bucket_6 = 9; 1471 optional int64 temp_residency_ms_bucket_7 = 10; 1472 optional int64 temp_residency_ms_bucket_8 = 11; 1473 optional int64 temp_residency_ms_bucket_9 = 12; 1474 optional int64 temp_residency_ms_bucket_10 = 13; 1475 optional int64 temp_residency_ms_bucket_11 = 14; 1476 optional int64 temp_residency_ms_bucket_12 = 15; 1477 optional int64 temp_residency_ms_bucket_13 = 16; 1478 optional int64 temp_residency_ms_bucket_14 = 17; 1479 optional int64 temp_residency_ms_bucket_15 = 18; 1480 optional int64 temp_residency_ms_bucket_16 = 19; 1481 optional int64 temp_residency_ms_bucket_17 = 20; 1482 optional int64 temp_residency_ms_bucket_18 = 21; 1483 optional int64 temp_residency_ms_bucket_19 = 22; 1484 optional int64 temp_residency_ms_bucket_20 = 23; 1485 1486 // The maximum and minimum temperature observed for the sensor along with the 1487 // timestamp of occurrence in terms of time_t. 1488 optional float max_temp = 24; 1489 optional int64 max_temp_timestamp = 25; 1490 optional float min_temp = 26; 1491 optional int64 min_temp_timestamp = 27; 1492} 1493 1494/** 1495 * Logs the Resume Latency stats. 1496 */ 1497message VendorResumeLatencyStats { 1498 optional string reverse_domain_name = 1; 1499 optional int64 max_latency_ms = 2; 1500 optional int64 avg_latency_ms = 3; 1501 1502 // Resume Latency stats is measured by count of resumes that lay within some latency thresholds 1503 // e.g. 1504 // With resume times thresholds predefined as thresholds_i, thresholds_i+1, 1505 // resume_count_bucket_i measures count of resumes that lay within this two thresholds 1506 optional int64 resume_count_bucket_1 = 4; 1507 optional int64 resume_count_bucket_2 = 5; 1508 optional int64 resume_count_bucket_3 = 6; 1509 optional int64 resume_count_bucket_4 = 7; 1510 optional int64 resume_count_bucket_5 = 8; 1511 optional int64 resume_count_bucket_6 = 9; 1512 optional int64 resume_count_bucket_7 = 10; 1513 optional int64 resume_count_bucket_8 = 11; 1514 optional int64 resume_count_bucket_9 = 12; 1515 optional int64 resume_count_bucket_10 = 13; 1516 optional int64 resume_count_bucket_11 = 14; 1517 optional int64 resume_count_bucket_12 = 15; 1518 optional int64 resume_count_bucket_13 = 16; 1519 optional int64 resume_count_bucket_14 = 17; 1520 optional int64 resume_count_bucket_15 = 18; 1521 optional int64 resume_count_bucket_16 = 19; 1522 optional int64 resume_count_bucket_17 = 20; 1523 optional int64 resume_count_bucket_18 = 21; 1524 optional int64 resume_count_bucket_19 = 22; 1525 optional int64 resume_count_bucket_20 = 23; 1526 optional int64 resume_count_bucket_21 = 24; 1527 optional int64 resume_count_bucket_22 = 25; 1528 optional int64 resume_count_bucket_23 = 26; 1529 optional int64 resume_count_bucket_24 = 27; 1530 optional int64 resume_count_bucket_25 = 28; 1531 optional int64 resume_count_bucket_26 = 29; 1532 optional int64 resume_count_bucket_27 = 30; 1533 optional int64 resume_count_bucket_28 = 31; 1534 optional int64 resume_count_bucket_29 = 32; 1535 optional int64 resume_count_bucket_30 = 33; 1536 optional int64 resume_count_bucket_31 = 34; 1537 optional int64 resume_count_bucket_32 = 35; 1538 optional int64 resume_count_bucket_33 = 36; 1539 optional int64 resume_count_bucket_34 = 37; 1540 optional int64 resume_count_bucket_35 = 38; 1541 optional int64 resume_count_bucket_36 = 39; 1542} 1543 1544/* 1545 * Log the Brownout events. 1546 */ 1547message BrownoutDetected { 1548 enum IRQType { 1549 UVLO1 = 0; 1550 SMPL_WARN = 1; 1551 UVLO2 = 2; 1552 BATOILO = 3; 1553 BATOILO2 = 4; 1554 } 1555 1556 enum BrownoutReason { 1557 UNKNOWN = 0; 1558 UVLO_IF = 1; 1559 OCP_IF = 2; 1560 UVLO_MAIN = 3; 1561 UVLO_SUB = 4; 1562 OCP_B1M = 5; 1563 OCP_B2M = 6; 1564 OCP_B3M = 7; 1565 OCP_B4M = 8; 1566 OCP_B5M = 9; 1567 OCP_B6M = 10; 1568 OCP_B7M = 11; 1569 OCP_B8M = 12; 1570 OCP_B9M = 13; 1571 OCP_B10M = 14; 1572 OCP_B1S = 15; 1573 OCP_B2S = 16; 1574 OCP_B3S = 17; 1575 OCP_B4S = 18; 1576 OCP_B5S = 19; 1577 OCP_B6S = 20; 1578 OCP_B7S = 21; 1579 OCP_B8S = 22; 1580 OCP_B9S = 23; 1581 OCP_B10S = 24; 1582 OCP_BAS = 25; 1583 OCP_BBS = 26; 1584 OCP_BCS = 27; 1585 OCP_BDS = 28; 1586 OCP2_IF = 29; 1587 } 1588 1589 // Reverse domain name. (e.g. Pixel) 1590 optional string reverse_domain_name = 1; 1591 // Triggered mitigation IRQ 1592 optional IRQType triggered_irq = 2; 1593 // Triggered timestamp 1594 optional int64 triggered_timestamp = 3; 1595 // Triggered battery temperature 1596 optional int32 battery_temp = 4; 1597 // Triggered battery age 1598 optional int32 battery_cycle = 5; 1599 // Triggered battery soc 1600 optional int32 battery_soc = 6; 1601 // Triggered FG Reading: Voltage Now 1602 optional int32 voltage_now = 7; 1603 // Triggered ODPM Reading: Channel 1 1604 optional int32 odpm_channel01 = 8; 1605 // Triggered ODPM Reading: Channel 2 1606 optional int32 odpm_channel02 = 9; 1607 // Triggered ODPM Reading: Channel 3 1608 optional int32 odpm_channel03 = 10; 1609 // Triggered ODPM Reading: Channel 4 1610 optional int32 odpm_channel04 = 11; 1611 // Triggered ODPM Reading: Channel 5 1612 optional int32 odpm_channel05 = 12; 1613 // Triggered ODPM Reading: Channel 6 1614 optional int32 odpm_channel06 = 13; 1615 // Triggered ODPM Reading: Channel 7 1616 optional int32 odpm_channel07 = 14; 1617 // Triggered ODPM Reading: Channel 8 1618 optional int32 odpm_channel08 = 15; 1619 // Triggered ODPM Reading: Channel 9 1620 optional int32 odpm_channel09 = 16; 1621 // Triggered ODPM Reading: Channel 10 1622 optional int32 odpm_channel10 = 17; 1623 // Triggered ODPM Reading: Channel 11 1624 optional int32 odpm_channel11 = 18; 1625 // Triggered ODPM Reading: Channel 12 1626 optional int32 odpm_channel12 = 19; 1627 // Triggered ODPM Reading: Channel 13 1628 optional int32 odpm_channel13 = 20; 1629 // Triggered ODPM Reading: Channel 14 1630 optional int32 odpm_channel14 = 21; 1631 // Triggered ODPM Reading: Channel 15 1632 optional int32 odpm_channel15 = 22; 1633 // Triggered ODPM Reading: Channel 16 1634 optional int32 odpm_channel16 = 23; 1635 // Triggered ODPM Reading: Channel 17 1636 optional int32 odpm_channel17 = 24; 1637 // Triggered ODPM Reading: Channel 18 1638 optional int32 odpm_channel18 = 25; 1639 // Triggered ODPM Reading: Channel 19 1640 optional int32 odpm_channel19 = 26; 1641 // Triggered ODPM Reading: Channel 20 1642 optional int32 odpm_channel20 = 27; 1643 // Triggered ODPM Reading: Channel 21 1644 optional int32 odpm_channel21 = 28; 1645 // Triggered ODPM Reading: Channel 22 1646 optional int32 odpm_channel22 = 29; 1647 // Triggered ODPM Reading: Channel 23 1648 optional int32 odpm_channel23 = 30; 1649 // Triggered ODPM Reading: Channel 24 1650 optional int32 odpm_channel24 = 31; 1651 // Triggered DVFS State: Channel 1 1652 optional int32 dvfs_channel1 = 32; 1653 // Triggered DVFS State: Channel 2 1654 optional int32 dvfs_channel2 = 33; 1655 // Triggered DVFS State: Channel 3 1656 optional int32 dvfs_channel3 = 34; 1657 // Triggered DVFS State: Channel 4 1658 optional int32 dvfs_channel4 = 35; 1659 // Triggered DVFS State: Channel 5 1660 optional int32 dvfs_channel5 = 36; 1661 // Triggered DVFS State: Channel 6 1662 optional int32 dvfs_channel6 = 37; 1663 // brownout reason 1664 optional BrownoutReason brownout_reason = 38; 1665 // max current 1666 optional int32 max_current = 39; 1667 // event counter uvlo1 1668 optional int32 evt_cnt_uvlo1 = 40; 1669 // event counter uvlo2 1670 optional int32 evt_cnt_uvlo2 = 41; 1671 // event counter oilo1 1672 optional int32 evt_cnt_oilo1 = 42; 1673 // event counter oilo2 1674 optional int32 evt_cnt_oilo2 = 43; 1675 // VIMON vbatt 1676 optional int32 vimon_vbatt = 44; 1677 // VIMON ibatt 1678 optional int32 vimon_ibatt = 45; 1679 // Mitigation Method 0 1680 optional int32 mitigation_method_0 = 46; 1681 // Mitigation Method 0 Entry Count 1682 optional int32 mitigation_method_0_count = 47; 1683 // Mitigation Method 0 Entry Time 1684 optional int64 mitigation_method_0_time_us = 48; 1685} 1686 1687/* 1688 * PCIe Link Statistics 1689 */ 1690message PcieLinkStatsReported { 1691 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 1692 optional string reverse_domain_name = 1; 1693 1694 /* Count of new PCIe Link Down events on the modem interface */ 1695 optional int32 modem_pcie_linkdowns = 2; 1696 /* Count of new PCIe Completion Timeout events on the modem interface */ 1697 optional int32 modem_pcie_completion_timeouts = 3; 1698 /* Count of new PCIe Link Up Failure events on the modem interface */ 1699 optional int32 modem_pcie_linkup_failures = 4; 1700 /* Average pll lock time (uS) during PCIe Link Up on modem interface */ 1701 optional int32 modem_pcie_pll_lock_avg = 5; 1702 /* Average time (uS) for successful PCIe Link Up on modem interface */ 1703 optional int32 modem_pcie_link_up_avg = 6; 1704 1705 /* Count of new PCIe Link Down events on the wifi interface */ 1706 optional int32 wifi_pcie_linkdowns = 7; 1707 /* Count of new PCIe Completion Timeout events on the wifi interface */ 1708 optional int32 wifi_pcie_completion_timeouts = 8; 1709 /* Count of new PCIe Link Up Failure events on the wifi interface */ 1710 optional int32 wifi_pcie_linkup_failures = 9; 1711 /* Average pll lock time (uS) during PCIe Link Up on wifi interface */ 1712 optional int32 wifi_pcie_pll_lock_avg = 10; 1713 /* Average time (uS) for successful PCIe Link Up on wifi interface */ 1714 optional int32 wifi_pcie_link_up_avg = 11; 1715 1716 /* Count of new PCIe Link Recovery Failure events on the modem interface */ 1717 optional int32 modem_pcie_link_recovery_failures = 12; 1718 /* Count of new PCIe Link Recovery Failure events on the wifi interface */ 1719 optional int32 wifi_pcie_link_recovery_failures = 13; 1720} 1721 1722/** 1723 * Log the CDEV request stats per sensor, binded cooling device. 1724 * Logged from: hardware/google/pixel/thermal/utils/thermal_stats_helper.cpp 1725 */ 1726message VendorSensorCoolingDeviceStats { 1727 optional string reverse_domain_name = 1; 1728 // Sensor name which is making the cooling device request 1729 optional string trigger_sensor_name = 2; 1730 1731 // Cooling device name for which request is being made 1732 optional string cooling_device_name = 3; 1733 1734 // Time duration for which stats are recorded 1735 optional int64 since_last_update_ms = 4; 1736 1737 // Sequence of values corresponding to time spent in each request state 1738 optional int64 time_in_state_ms_bucket_1 = 5; 1739 optional int64 time_in_state_ms_bucket_2 = 6; 1740 optional int64 time_in_state_ms_bucket_3 = 7; 1741 optional int64 time_in_state_ms_bucket_4 = 8; 1742 optional int64 time_in_state_ms_bucket_5 = 9; 1743 optional int64 time_in_state_ms_bucket_6 = 10; 1744 optional int64 time_in_state_ms_bucket_7 = 11; 1745 optional int64 time_in_state_ms_bucket_8 = 12; 1746 optional int64 time_in_state_ms_bucket_9 = 13; 1747 optional int64 time_in_state_ms_bucket_10 = 14; 1748 optional int64 time_in_state_ms_bucket_11 = 15; 1749 optional int64 time_in_state_ms_bucket_12 = 16; 1750 optional int64 time_in_state_ms_bucket_13 = 17; 1751 optional int64 time_in_state_ms_bucket_14 = 18; 1752 optional int64 time_in_state_ms_bucket_15 = 19; 1753 optional int64 time_in_state_ms_bucket_16 = 20; 1754 optional int64 time_in_state_ms_bucket_17 = 21; 1755 optional int64 time_in_state_ms_bucket_18 = 22; 1756 optional int64 time_in_state_ms_bucket_19 = 23; 1757 optional int64 time_in_state_ms_bucket_20 = 24; 1758} 1759 1760/* Log playcount of effects in Vibrator HAL 1761 * 1762 * Logged from: 1763 * hardware/google/pixel/vibrator/ 1764 */ 1765message VibratorPlaycountReported { 1766 // Vendor reverse domain name (expecting "com.google.pixel"). 1767 optional string reverse_domain_name = 1; 1768 1769 // Playcount for each primitive 1770 // Each index tracks the count for that index in the waveform 1771 repeated int32 waveform_counts = 2; 1772 1773 // Playcount for each 50ms range. 1774 // Each index tracks [50ms * i, 50ms * (i + 1)) 1775 repeated int32 duration_counts = 3; 1776} 1777 1778/* Log latency encountered in Vibrator HAL 1779 * 1780 * Logged from: 1781 * hardware/google/pixel/vibrator/ 1782 */ 1783message VibratorLatencyReported { 1784 // Vendor reverse domain name (expecting "com.google.pixel"). 1785 optional string reverse_domain_name = 1; 1786 1787 // Minimum latency seen 1788 // 0 Prebaked and primitives 1789 // 1 Composed effects 1790 // 2 PWLE effects 1791 repeated int32 min_latencies = 2; 1792 1793 // Maximum latency seen 1794 // 0 Prebaked and primitives 1795 // 1 Composed effects 1796 // 2 PWLE effects 1797 repeated int32 max_latencies = 3; 1798 1799 // Average latency seen 1800 // 0 Prebaked and primitives 1801 // 1 Composed effects 1802 // 2 PWLE effects 1803 repeated int32 avg_latencies = 4; 1804} 1805 1806/* Log errors encountered in Vibrator HAL 1807 * 1808 * Logged from: 1809 * hardware/google/pixel/vibrator/ 1810 */ 1811message VibratorErrorsReported { 1812 // Vendor reverse domain name (expecting "com.google.pixel"). 1813 optional string reverse_domain_name = 1; 1814 1815 // Count for each error 1816 // 0 HwAPI Error 1817 // 1 HwCAL Error 1818 // 2 Compose Fail Error 1819 // 3 ALSA Fail Error 1820 // 4 Async Fail Error 1821 // 5 Bad Timeout Error 1822 // 6 Bad Amplitude Error 1823 // 7 Bad Effect Error 1824 // 8 Bad Effect Strength Error 1825 // 9 Bad Primitive Error 1826 // 10 Bad Composite Error 1827 // 11 PWLE Construction Fail Error 1828 // 12 Unsupported Method Error 1829 repeated int32 error_counts = 2; 1830} 1831 1832/* A message containing F2FS Atomic Write information */ 1833message F2fsAtomicWriteInfo { 1834 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 1835 optional string reverse_domain_name = 1; 1836 /* Show the peak value of total current atomic write block count after boot */ 1837 optional int32 peak_atomic_write = 2; 1838 /* Show the accumulated total committed atomic write block count after boot */ 1839 optional int32 committed_atomic_block = 3; 1840 /* Show the accumulated total revoked atomic write block count after boot */ 1841 optional int32 revoked_atomic_block = 4; 1842} 1843 1844/* A message containing Partition Used Spaced information */ 1845message PartitionsUsedSpaceReported { 1846 enum Directory { 1847 UNKNOWN = 0; 1848 PERSIST = 1; 1849 } 1850 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 1851 optional string reverse_domain_name = 1; 1852 1853 /* used space of directory information */ 1854 optional Directory directory = 2; 1855 optional int64 free_bytes = 3; 1856 optional int64 total_bytes = 4; 1857} 1858 1859message GpuEvent { 1860 enum GpuEventType { 1861 MALI_TYPE_NONE = 0; 1862 MALI_KMD_ERROR = 1; 1863 MALI_GPU_RESET = 2; 1864 } 1865 enum GpuEventInfo { 1866 MALI_INFO_NONE = 0; 1867 MALI_CSG_REQ_STATUS_UPDATE = 1; 1868 MALI_CSG_SUSPEND = 2; 1869 MALI_CSG_SLOTS_SUSPEND = 3; 1870 MALI_CSG_GROUP_SUSPEND = 4; 1871 MALI_CSG_EP_CFG = 5; 1872 MALI_CSG_SLOTS_START = 6; 1873 MALI_GROUP_TERM = 7; 1874 MALI_QUEUE_START = 8; 1875 MALI_QUEUE_STOP = 9; 1876 MALI_QUEUE_STOP_ACK = 10; 1877 MALI_CSG_SLOT_READY = 11; 1878 MALI_L2_PM_TIMEOUT = 12; 1879 MALI_PM_TIMEOUT = 13; 1880 MALI_CSF_RESET_OK = 14; 1881 MALI_CSF_RESET_FAILED = 15; 1882 MALI_TILER_OOM = 16; 1883 MALI_PROGRESS_TIMER = 17; 1884 MALI_CS_ERROR = 18; 1885 MALI_FW_ERROR = 19; 1886 MALI_PMODE_EXIT_TIMEOUT = 20; 1887 MALI_PMODE_ENTRY_FAILURE = 21; 1888 MALI_GPU_PAGE_FAULT = 22; 1889 MALI_MMU_AS_ACTIVE_STUCK = 23; 1890 } 1891 1892 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 1893 optional string reverse_domain_name = 1; 1894 /* 1895 * Type of the GPU event. Possible values depend on the platform GPU. 1896 * Eg, MALI_KMD_ERROR, MALI_GPU_RESET. 1897 */ 1898 optional GpuEventType gpu_event_type = 2; 1899 /* 1900 * Additional information about the GPU event. Possible values depend 1901 * on the platform GPU. 1902 * Eg, MALI_PM_TIMEOUT, MALI_CSF_RESET_OK. 1903 */ 1904 optional GpuEventInfo gpu_event_info = 3; 1905} 1906/** 1907 * Log mitigation duration. 1908 */ 1909message PowerMitigationDurationCounts { 1910 optional string reverse_domain_name = 1; 1911 // Count of UVLO1 greater than threshold without any other concurrent IRQs. 1912 optional int32 greater_than_thresh_uvlo1_none = 2; 1913 // Count of UVLO1 IRQ + MMWAVE IRQ with duration greater than threshold. 1914 optional int32 greater_than_thresh_uvlo1_mmwave = 3; 1915 // Count of UVLO1 IRQ + RFFE IRQ with duration greater than threshold. 1916 optional int32 greater_than_thresh_uvlo1_rffe = 4; 1917 // Count of UVLO2 greater than threshold without any other concurrent IRQs. 1918 optional int32 greater_than_thresh_uvlo2_none = 5; 1919 // Count of UVLO2 IRQ + MMWAVE IRQ with duration greater than threshold. 1920 optional int32 greater_than_thresh_uvlo2_mmwave = 6; 1921 // Count of UVLO2 IRQ + RFFE IRQ with duration greater than threshold. 1922 optional int32 greater_than_thresh_uvlo2_rffe = 7; 1923 // Count of BATOILO greater than threshold without any other concurrent IRQs. 1924 optional int32 greater_than_thresh_batoilo_none = 8; 1925 // Count of BATOILO IRQ + MMWAVE IRQ with duration greater than threshold. 1926 optional int32 greater_than_thresh_batoilo_mmwave = 9; 1927 // Count of BATOILO IRQ + RFFE IRQ with duration greater than threshold. 1928 optional int32 greater_than_thresh_batoilo_rffe = 10; 1929 1930 // IRQ duration of main regulator indices 0-11 greater than threshold. 1931 optional int32 greater_than_thresh_main_0 = 11; 1932 optional int32 greater_than_thresh_main_1 = 12; 1933 optional int32 greater_than_thresh_main_2 = 13; 1934 optional int32 greater_than_thresh_main_3 = 14; 1935 optional int32 greater_than_thresh_main_4 = 15; 1936 optional int32 greater_than_thresh_main_5 = 16; 1937 optional int32 greater_than_thresh_main_6 = 17; 1938 optional int32 greater_than_thresh_main_7 = 18; 1939 optional int32 greater_than_thresh_main_8 = 19; 1940 optional int32 greater_than_thresh_main_9 = 20; 1941 optional int32 greater_than_thresh_main_10 = 21; 1942 optional int32 greater_than_thresh_main_11 = 22; 1943 1944 // IRQ duration of sub regulator indices 0-11 greater than threshold. 1945 optional int32 greater_than_thresh_sub_0 = 23; 1946 optional int32 greater_than_thresh_sub_1 = 24; 1947 optional int32 greater_than_thresh_sub_2 = 25; 1948 optional int32 greater_than_thresh_sub_3 = 26; 1949 optional int32 greater_than_thresh_sub_4 = 27; 1950 optional int32 greater_than_thresh_sub_5 = 28; 1951 optional int32 greater_than_thresh_sub_6 = 29; 1952 optional int32 greater_than_thresh_sub_7 = 30; 1953 optional int32 greater_than_thresh_sub_8 = 31; 1954 optional int32 greater_than_thresh_sub_9 = 32; 1955 optional int32 greater_than_thresh_sub_10 = 33; 1956 optional int32 greater_than_thresh_sub_11 = 34; 1957} 1958 1959/* 1960 * Logs the third party audio effects stats. 1961 * Third party audio effects stats includes duration in milliseconds for each 1962 * instance of the effects (speaker, USB, etc.). 1963 */ 1964message VendorAudioThirdPartyEffectStatsReported { 1965 /* Vendor reverse domain name (expecting "com.google.pixel"). */ 1966 optional string reverse_domain_name = 1; 1967 1968 enum InstanceId { 1969 OTHER = 0; 1970 SPEAKER = 1; 1971 USB = 2; 1972 BT_A2DP = 3; 1973 BT_LE = 4; 1974 } 1975 /* Instance of the effect. */ 1976 optional InstanceId instance = 2; 1977 /* Active duration in milliseconds per day for volume range 0. */ 1978 optional int32 volume_range_0_active_ms_per_day = 3; 1979 /* Active duration in milliseconds per day for volume range 1. */ 1980 optional int32 volume_range_1_active_ms_per_day = 4; 1981 /* Active duration in milliseconds per day for volume range 2. */ 1982 optional int32 volume_range_2_active_ms_per_day = 5; 1983 /* Active duration in milliseconds per day for volume range 3. */ 1984 optional int32 volume_range_3_active_ms_per_day = 6; 1985 /* Active duration in milliseconds per day for volume range 4. */ 1986 optional int32 volume_range_4_active_ms_per_day = 7; 1987 /* Active duration in milliseconds per day for volume range 5. */ 1988 optional int32 volume_range_5_active_ms_per_day = 8; 1989 /* Active duration in milliseconds per day for volume range 6. */ 1990 optional int32 volume_range_6_active_ms_per_day = 9; 1991 /* Active duration in milliseconds per day for volume range 7. */ 1992 optional int32 volume_range_7_active_ms_per_day = 10; 1993 /* Active duration in milliseconds per day for volume range 8. */ 1994 optional int32 volume_range_8_active_ms_per_day = 11; 1995 /* Active duration in milliseconds per day for volume range 9. */ 1996 optional int32 volume_range_9_active_ms_per_day = 12; 1997} 1998 1999/* 2000 * Logs the Audio Adapted information stats. 2001 * Two stats are recorded, count and duration (in ms) per features. 2002 */ 2003message VendorAudioAdaptedInfoStatsReported { 2004 /* Vendor reverse domain name */ 2005 optional string reverse_domain_name = 1; 2006 2007 enum AdaptedInfoFeature { 2008 UNKNOWN = 0; 2009 BATTERY_ADAPTED_AUDIO_CONTROL = 1; 2010 MEDIA_PLAYBACK_THERMAL_THROTTLE = 2; 2011 TELEPHONY_THERMAL_THROTTLE = 3; 2012 ACOUSTIC_SHOCK = 4; 2013 SPATIAL_AUDIO = 5; 2014 }; 2015 /* Feature to record the stats */ 2016 optional AdaptedInfoFeature feature_id = 2; 2017 /* Number of time the feature is active */ 2018 optional int32 active_counts_per_day = 3; 2019 /* Duration the feature is active in milliseconds */ 2020 optional int32 active_duration_ms_per_day = 4; 2021} 2022 2023/* 2024 * Logs the audio PCM usage stats. 2025 * PCM usage includes average latency and total active count per day. 2026 */ 2027message VendorAudioPcmStatsReported { 2028 /* Vendor reverse domain name */ 2029 optional string reverse_domain_name = 1; 2030 2031 enum HalPcmType { 2032 UNKNOWN = 0; 2033 DEEPBUFFER = 1; 2034 LOWLATENCY = 2; 2035 MMAP_PLAY = 3; 2036 RAW_PLAY = 4; 2037 IMMERSIVE = 5; 2038 HAPTIC = 6; 2039 COMPRESS = 7; 2040 MMAP_REC = 8; 2041 RAW_REC = 9; 2042 AUDIO_REC = 10; 2043 HIFI_RX = 11; 2044 HIFI_TX = 12; 2045 IMMUTABLE_RX = 13; 2046 CUSTOM_PCM_1 = 14; 2047 CUSTOM_PCM_2 = 15; 2048 CUSTOM_PCM_3 = 16; 2049 CUSTOM_PCM_4 = 17; 2050 CUSTOM_PCM_5 = 18; 2051 }; 2052 /* Type of PCM */ 2053 optional HalPcmType type = 2; 2054 /* Average latency in millisecond of the pcm type per day. */ 2055 optional int32 pcm_open_latency_avg_ms_per_day = 3; 2056 /* Total active count of the pcm type per day. */ 2057 optional int32 pcm_active_counts_per_day = 4; 2058} 2059 2060/** 2061 * Keep track of information about a USB data session, which is defined 2062 * as the period when a port enters a data role (either host or device) to 2063 * when the port exits the data role. 2064 */ 2065message VendorUsbDataSessionEvent { 2066 /* Vendor reverse domain name (expecting "com.google.pixel") */ 2067 optional string reverse_domain_name = 1; 2068 2069 enum UsbDataRole { 2070 USB_ROLE_UNKNOWN = 0; 2071 USB_ROLE_DEVICE = 1; 2072 USB_ROLE_HOST = 2; 2073 } 2074 /** 2075 * USB device states are key milestones in a USB connection. 2076 * For device data role, a typical transition would be like: 2077 * not attached -> default -> addressed -> configured. 2078 * For host data role, a typical transition would be like 2079 * not attached -> powered -> default -> addressed -> configured. 2080 */ 2081 enum UsbDeviceState { 2082 USB_STATE_UNKNOWN = 0; 2083 USB_STATE_NOT_ATTACHED = 1; 2084 USB_STATE_ATTACHED = 2; 2085 USB_STATE_POWERED = 3; 2086 USB_STATE_DEFAULT = 4; 2087 USB_STATE_ADDRESSED = 5; 2088 USB_STATE_CONFIGURED = 6; 2089 USB_STATE_SUSPENDED = 7; 2090 } 2091 /* USB data role of the data session. */ 2092 optional UsbDataRole usb_role = 2; 2093 /* Usb device state transitions during the data session. */ 2094 repeated UsbDeviceState usb_states = 3; 2095 /** 2096 * Elapsed time from the start of the data session when entering the 2097 * state, mapped 1-1 to the usb_states field. 2098 */ 2099 repeated int64 elapsed_time_ms = 4; 2100 // Duration of the data session. 2101 optional int64 duration_ms = 5; 2102} 2103 2104/* 2105 * Logs the thermal sensor abnormal event when detected. 2106 * Logged from: 2107 * virtual sensors: hardware/google/pixel/thermal/utils/thermal_stats_helper.cpp 2108 * thermistors & SoC: hardware/google/pixel/pixelstats/UeventListener.cpp 2109 */ 2110message ThermalSensorAbnormalityDetected { 2111 enum AbnormalityType { 2112 UNKNOWN = 0; 2113 SENSOR_STUCK = 1; 2114 EXTREME_HIGH_TEMP = 2; 2115 EXTREME_LOW_TEMP = 3; 2116 HIGH_RISING_SPEED = 4; 2117 TEMP_READ_FAIL = 5; 2118 } 2119 2120 /* Vendor reverse domain name */ 2121 optional string reverse_domain_name = 1; 2122 /* Type of Thermal Sensor Abnormality */ 2123 optional AbnormalityType type = 2; 2124 /* Name of the problematic sensor */ 2125 optional string sensor = 3; 2126 /* Abnormal temp reading of sensor */ 2127 optional int32 temp = 4; 2128} 2129 2130/** 2131 * Logs the reported vendor audio offloaded effects usage stats. 2132 */ 2133message VendorAudioOffloadedEffectStatsReported { 2134 /* Vendor reverse domain name */ 2135 optional string reverse_domain_name = 1; 2136 2137 /* UUID most significant bit */ 2138 optional int64 effect_uuid_msb = 2; 2139 2140 /* UUID least significant bit */ 2141 optional int64 effect_uuid_lsb = 3; 2142 2143 /* Active seconds per day. */ 2144 optional int32 effect_active_seconds_per_day = 4; 2145} 2146 2147/* 2148 * Logs the Bluetooth Audio stats. 2149 * Two stats are recorded, count and duration (in ms) per features. 2150 */ 2151message VendorAudioBtMediaStatsReported { 2152 /* Vendor reverse domain name */ 2153 optional string reverse_domain_name = 1; 2154 2155 enum Codec { 2156 UNKNOWN = 0; 2157 SBC = 1; 2158 AAC = 2; 2159 OPUS = 3; 2160 LC3 = 4; 2161 } 2162 /* Codec to record. */ 2163 optional Codec bt_codec_type = 2; 2164 /* Total active seconds to record. */ 2165 optional int32 active_seconds_per_day = 3; 2166} 2167 2168/* 2169 * Logs the usage of APIs in Pixel Impulse. 2170 */ 2171message PixelImpulseUsageReported { 2172 /* Vendor reverse domain name */ 2173 optional string reverse_domain_name = 1; 2174 2175 /* UID of the caller package */ 2176 optional int32 caller_uid = 2 [(android.os.statsd.is_uid) = true]; 2177 2178 /* UID of the callee package */ 2179 optional int32 callee_uid = 3 [(android.os.statsd.is_uid) = true]; 2180 2181 enum ApiName { 2182 API_UNKNOWN = 0; 2183 /* Server side */ 2184 API_SERVICE_BIND = 1; 2185 API_SERVICE_UNBIND = 2; 2186 API_REGISTER = 3; 2187 API_UNREGISTER = 4; 2188 API_CLEAR_APP_DATA = 100; 2189 /* Client side */ 2190 API_SERVER_START = 1001; 2191 API_PIXEL_STATE_CHANGE = 1002; 2192 /* Internal */ 2193 INTERNAL_PLATFORM_CONNECTION_CONNECT = 10001; 2194 INTERNAL_PLATFORM_CONNECTION_DISCONNECT = 10002; 2195 INTERNAL_PLATFORM_CONNECTION_CHANGE = 10003; 2196 INTERNAL_CLIENT_LISTENER_ADD = 10004; 2197 INTERNAL_CLIENT_LISTENER_REMOVE = 10005; 2198 INTERNAL_WAIT = 10006; 2199 } 2200 /* Invoked API name */ 2201 optional ApiName api_name = 4; 2202 2203 enum Tag { 2204 TAG_UNKNOWN = 0; 2205 TAG_TEMPERATURE_READ_DELAY = 1; 2206 } 2207 /* Tag for debugging purpose */ 2208 optional Tag tag = 5; 2209 2210 /* Timestamp of the usage start in epoch time */ 2211 optional int64 usage_start_epoch_millis = 6; 2212 2213 /* Timestamp of the usage start since device boot */ 2214 optional int64 usage_start_uptime_millis = 7; 2215 2216 /* Duration of the usage */ 2217 optional int64 usage_duration_millis = 8; 2218 2219 /* Whether the invocation was successful */ 2220 optional bool success = 9; 2221 2222 enum FailReason { 2223 FAIL_REASON_UNKNOWN = 0; 2224 FAIL_REASON_INVALID_ARGUMENT = 1; 2225 FAIL_REASON_UNAUTHORIZED = 2; 2226 FAIL_REASON_TIMEOUT = 3; 2227 FAIL_REASON_NOT_FOUND = 4; 2228 FAIL_REASON_INVALID_STATE = 5; 2229 } 2230 /* Fail reason (if success == false) */ 2231 optional FailReason fail_reason = 10; 2232 2233 /* Size of the arguments */ 2234 optional int32 request_size = 11; 2235 2236 /* Platform connection usage */ 2237 /* Used when api_name == INTERNAL_PLATFORM_CONNECTION_CHANGE */ 2238 optional int32 internal_platform_connection_count = 12; 2239 2240 /* Client state source usage */ 2241 /* Used when api_name == INTERNAL_CLIENT_LISTENER_* */ 2242 optional int32 internal_client_listener_count = 13; 2243 2244 enum StateSource { 2245 STATE_SOURCE_UNKNOWN = 0; 2246 STATE_SOURCE_UID_IMPORTANCE = 1; 2247 STATE_SOURCE_CAMERA_AVAILABILITY = 2; 2248 STATE_SOURCE_DROPBOX_BROADCAST = 3; 2249 STATE_SOURCE_TEMPERATURE = 4; 2250 STATE_SOURCE_THERMAL_STATUS = 5; 2251 } 2252 /* State source involved */ 2253 /* Used when api_name == INTERNAL_PLATFORM_CONNECTION_* or 2254 * api_name == INTERNAL_CLIENT_LISTENER_* */ 2255 optional StateSource state_source = 14; 2256 2257 /* UID importance cut point */ 2258 /* This is the UID importance cutpoint associated with the 2259 * OnUidImportanceListener 2260 */ 2261 /* Used when state_source == STATE_SOURCE_UID_IMPORTANCE */ 2262 optional android.app.Importance uid_importance_cut_point = 15; 2263} 2264 2265/** 2266 * Log DisplayPort link error statistics. 2267 */ 2268message DisplayPortErrorStats { 2269 /* Vendor reverse domain name */ 2270 optional string reverse_domain_name = 1; 2271 2272 /* The error count due to link training failed. */ 2273 optional int32 link_negotiation_failures = 2; 2274 /* The error count due to read EDID failed. */ 2275 optional int32 edid_read_failures = 3; 2276 /* The error count due to read dpcd failed. */ 2277 optional int32 dpcd_read_failures = 4; 2278 /* The error count due to EDID is invalid. */ 2279 optional int32 edid_invalid_failures = 5; 2280 /* The error count due to sink count is invalid. */ 2281 optional int32 sink_count_invalid_failures = 6; 2282 /* The error count due to link unstable. */ 2283 optional int32 link_unstable_failures = 7; 2284} 2285 2286/** 2287 * Log HDCP authentication type statistics. 2288 */ 2289message HDCPAuthTypeStats { 2290 /* Vendor reverse domain name */ 2291 optional string reverse_domain_name = 1; 2292 2293 /* The count due to hdcp2 success */ 2294 optional int32 hdcp2_success_count = 2; 2295 /* The count due to hdcp2 fallback */ 2296 optional int32 hdcp2_fallback_count = 3; 2297 /* The count due to hdcp2 fail */ 2298 optional int32 hdcp2_fail_count = 4; 2299 /* The count due to hdcp1 success */ 2300 optional int32 hdcp1_success_count = 5; 2301 /* The count due to hdcp1 fail */ 2302 optional int32 hdcp1_fail_count = 6; 2303 /* The count due to hdcp0 */ 2304 optional int32 hdcp0_count = 7; 2305} 2306 2307/** 2308 * A message containing how DisplayPort is being used in a day. 2309 */ 2310message DisplayPortUsage { 2311 /* Vendor reverse domain name */ 2312 optional string reverse_domain_name = 1; 2313 2314 /* resolution width */ 2315 optional int32 width = 2; 2316 /* resolution height */ 2317 optional int32 height = 3; 2318 /* refresh rate */ 2319 optional float refresh_rate = 4; 2320 /* vendor ID. */ 2321 optional int32 vendor_id = 5; 2322 /* product ID. */ 2323 optional int32 product_id = 6; 2324 /* indicated start/stop event of DP usage */ 2325 optional bool connected = 7; 2326} 2327 2328/* 2329 * A message containing max77779 fuel gauge abnormal events 2330 * Logged from: 2331 * hardware/google/pixel/pixelstats/BatteryFGReporter.cpp 2332 */ 2333message FuelGaugeAbnormalityReported { 2334 enum Event { 2335 UNKNOWN_EVENT = 0; 2336 FULLCAPNOM_LOW = 1; // unexpected fullcapnom learning (too low) 2337 FULLCAPNOM_HIGH = 2; // unexpected fullcapnom learning (too high) 2338 REPSOC_EDET = 3; // empty detect false alarm 2339 REPSOC_FDET = 4; // full detect false alarm 2340 REPSOC = 5; // repsoc not accurate 2341 VFOCV = 6; // vfocv estimation wrong 2342 } 2343 enum EventState { 2344 UNKNOWN_STATE = 0; 2345 UNTRIGGER = 1; 2346 TRIGGER = 2; 2347 } 2348 /* Vendor reverse domain name */ 2349 optional string reverse_domain_name = 1; 2350 /* Report by which event */ 2351 repeated Event event = 2; 2352 /* State was triggered or untriggered */ 2353 repeated EventState event_state = 3; 2354 optional int32 duration_secs = 4; 2355 /* Record fuel gauge registers at the time of the event */ 2356 optional int32 fg_register_address_1 = 5; 2357 optional int32 fg_register_data_1 = 6; 2358 optional int32 fg_register_address_2 = 7; 2359 optional int32 fg_register_data_2 = 8; 2360 optional int32 fg_register_address_3 = 9; 2361 optional int32 fg_register_data_3 = 10; 2362 optional int32 fg_register_address_4 = 11; 2363 optional int32 fg_register_data_4 = 12; 2364 optional int32 fg_register_address_5 = 13; 2365 optional int32 fg_register_data_5 = 14; 2366 optional int32 fg_register_address_6 = 15; 2367 optional int32 fg_register_data_6 = 16; 2368 optional int32 fg_register_address_7 = 17; 2369 optional int32 fg_register_data_7 = 18; 2370 optional int32 fg_register_address_8 = 19; 2371 optional int32 fg_register_data_8 = 20; 2372 optional int32 fg_register_address_9 = 21; 2373 optional int32 fg_register_data_9 = 22; 2374 optional int32 fg_register_address_10 = 23; 2375 optional int32 fg_register_data_10 = 24; 2376 optional int32 fg_register_address_11= 25; 2377 optional int32 fg_register_data_11= 26; 2378 optional int32 fg_register_address_12= 27; 2379 optional int32 fg_register_data_12 = 28; 2380 optional int32 fg_register_address_13 = 29; 2381 optional int32 fg_register_data_13 = 30; 2382 optional int32 fg_register_address_14 = 31; 2383 optional int32 fg_register_data_14 = 32; 2384 optional int32 fg_register_address_15 = 33; 2385 optional int32 fg_register_data_15 = 34; 2386 optional int32 fg_register_address_16 = 35; 2387 optional int32 fg_register_data_16 = 36; 2388} 2389 2390/* 2391 * Process memory usage by Oom groups 2392 */ 2393message MmProcessUsageByOomGroupSnapshot { 2394 enum OomGroup { 2395 OOMR_950 = 0; 2396 OOMR_900 = 1; 2397 OOMR_850 = 2; 2398 OOMR_800 = 3; 2399 OOMR_750 = 4; 2400 OOMR_700 = 5; 2401 OOMR_650 = 6; 2402 OOMR_600 = 7; 2403 OOMR_550 = 8; 2404 OOMR_500 = 9; 2405 OOMR_450 = 10; 2406 OOMR_400 = 11; 2407 OOMR_350 = 12; 2408 OOMR_300 = 13; 2409 OOMR_250 = 14; 2410 OOMR_200 = 15; 2411 OOMS_200 = 16; 2412 OOMR_150 = 17; 2413 OOMR_100 = 18; 2414 OOMR_050 = 19; 2415 OOMR_000 = 20; 2416 OOMS_000 = 21; 2417 OOMR_NEGATIVE = 22; 2418 /* reserved for future error handling */ 2419 OOM_UNKNOWN = 999; 2420 } 2421 /* Vendor reverse domain name */ 2422 optional string reverse_domain_name = 1; 2423 /* Unique ID per knob read */ 2424 optional int32 metric_uid = 2; 2425 /* 2426 * This is the dimension: each knob read will create N atoms. 2427 * N = number of groups defined in the enumerate above. 2428 */ 2429 optional OomGroup oom_group = 3; 2430 optional int64 nr_task = 4; 2431 optional int64 file_rss = 5; 2432 optional int64 anon_rss = 6; 2433 optional int64 pgtable = 7; 2434 optional int64 swap_ent = 8; 2435 optional int64 shmem_rss = 9; 2436} 2437 2438/* 2439 * GCMA memory hourly snapshot 2440 */ 2441message MmGcmaSnapshot { 2442 /* Vendor reverse domain name */ 2443 optional string reverse_domain_name = 1; 2444 /* cached memory */ 2445 optional int64 cached = 2; 2446} 2447 2448/* 2449 * GCMA memory daily statistics 2450 */ 2451message MmGcmaStats { 2452 /* Vendor reverse domain name */ 2453 optional string reverse_domain_name = 1; 2454 /* statistics */ 2455 optional int64 discarded = 2; 2456 optional int64 evicted = 3; 2457 optional int64 loaded = 4; 2458 optional int64 stored = 5; 2459 repeated int64 latency_histogram = 6; 2460} 2461 2462/* 2463 * A message containing the USB audio capability of the connected accessories. 2464 */ 2465message VendorAudioUsbDeviceCapabilityStats { 2466 /* Vendor reverse domain name */ 2467 optional string reverse_domain_name = 1; 2468 2469 enum UsbMode { 2470 UNKNOWN_MODE = 0; 2471 ASYNC_MODE = 1; 2472 ADAPTIVE_MODE = 2; 2473 SYNC_MODE = 3; 2474 } 2475 /* USB Modes */ 2476 repeated UsbMode playback_supported_modes = 2; 2477 repeated UsbMode capture_supported_modes = 3; 2478 2479 enum UsbSpeed { 2480 OTHER_SPEED = 0; 2481 FULL_SPEED = 1; 2482 HIGH_SPEED = 2; 2483 SUPER_SPEED = 3; 2484 } 2485 /* USB Speed */ 2486 optional UsbSpeed usb_speed = 4 [deprecated = true]; 2487 2488 /* Data Packets Interval in ms. Expected value is between 125 and 1000.*/ 2489 repeated int32 playback_data_packet_interval = 5; 2490 repeated int32 capture_data_packet_interval = 6; 2491 2492 /* List of supported sample rates in increasing order. */ 2493 repeated int32 playback_supported_sample_rates = 7; 2494 repeated int32 capture_supported_sample_rates = 8; 2495 2496 /* Maximum number of channels supported */ 2497 optional int32 playback_supported_channel_count = 9; 2498 optional int32 capture_supported_channel_count = 10; 2499 2500 enum PcmType { 2501 DEFAULT = 0; 2502 INT16_BIT = 1; 2503 INT32_BIT = 2; 2504 FIXED_Q824 = 3; 2505 FLOAT32_BIT = 4; 2506 INT24_BIT = 5; 2507 DSD32_BIT = 6; 2508 } 2509 /* Supported PCM Type */ 2510 repeated PcmType playback_supported_pcm_types = 11; 2511 repeated PcmType capture_supported_pcm_types = 12; 2512 2513 /* Supported endian */ 2514 optional bool is_big_endian = 13; 2515 2516 /* Is USB device support playback */ 2517 optional bool is_playback = 14; 2518 2519 /* Duration connected */ 2520 optional int32 duration_second_connected = 15; 2521}; 2522 2523/* 2524 * A message containing battery time to full stats 2525 * Logged from: 2526 * hardware/google/pixel/pixelstats/BatteryTTFReporter.cpp 2527 */ 2528message BatteryTimeToFullStatsReported { 2529 // Vendor reverse domain name (expecting "com.google.pixel"). 2530 optional string reverse_domain_name = 1; 2531 2532 // The charge_counter and elap of each soc 2533 optional int32 ttf_type = 2; 2534 optional int32 ttf_range = 3; 2535 optional int32 soc_0 = 4; 2536 optional int32 soc_1 = 5; 2537 optional int32 soc_2 = 6; 2538 optional int32 soc_3 = 7; 2539 optional int32 soc_4 = 8; 2540 optional int32 soc_5 = 9; 2541 optional int32 soc_6 = 10; 2542 optional int32 soc_7 = 11; 2543 optional int32 soc_8 = 12; 2544 optional int32 soc_9 = 13; 2545} 2546 2547/* 2548 * A message containing Direct USB Access event. 2549 */ 2550message VendorAudioDirectUsbAccessUsageStats { 2551 /* Vendor reverse domain name */ 2552 optional string reverse_domain_name = 1; 2553 2554 optional int32 duration_second = 2; 2555}; 2556 2557/* 2558 * A message containing Usb Config event. 2559 */ 2560message VendorAudioUsbConfigStats { 2561 /* Vendor reverse domain name */ 2562 optional string reverse_domain_name = 1; 2563 2564 /* Is config for playback or capture */ 2565 optional bool is_playback = 2; 2566 2567 /* Is config for hifi */ 2568 optional bool has_hifi = 3; 2569 2570 /* Sample rate used */ 2571 optional int32 sample_rate = 4; 2572 2573 /* Channel used */ 2574 optional int32 channel = 5; 2575 2576 /* Pcm Type used */ 2577 optional int32 pcm_type = 6; 2578 2579 /* Duration in second */ 2580 optional int32 duration_second = 7; 2581}; 2582