1/* 2 * Copyright (C) 2023 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 = "proto3"; 18 19package android.automotive.watchdog; 20 21import "performance_stats.proto"; 22import "health_check_client_info.proto"; 23 24// Represents the CarWatchdog daemon dump. 25message CarWatchdogDaemonDump { 26 optional PerformanceProfilerDump performance_profiler_dump = 1; 27 optional HealthCheckServiceDump health_check_service_dump = 2; 28 // TODO(b/183436216): Add a field to capture flash memory overuse stats from 29 // the CarWatchdog daemon and CarWatchdogService. 30} 31 32message PerformanceProfilerDump { 33 enum EventType { 34 EVENT_TYPE_UNSPECIFIED = 0; 35 INIT = 1; 36 TERMINATED = 2; 37 BOOT_TIME_COLLECTION = 3; 38 PERIODIC_COLLECTION = 4; 39 USER_SWITCH_COLLECTION = 5; 40 WAKE_UP_COLLECTION = 6; 41 CUSTOM_COLLECTION = 7; 42 } 43 optional EventType current_event = 1; 44 optional PerformanceStats performance_stats = 2; 45} 46 47message HealthCheckServiceDump { 48 optional bool is_enabled = 1; 49 optional bool is_monitor_registered = 2; 50 optional bool is_system_shut_down_in_progress = 3; 51 repeated int32 stopped_users = 4; 52 optional int64 critical_health_check_window_millis = 5; 53 optional int64 moderate_health_check_window_millis = 6; 54 optional int64 normal_health_check_window_millis = 7; 55 optional VhalHealthCheckInfo vhal_health_check_info = 8; 56 repeated HealthCheckClientInfo registered_client_infos = 9; 57} 58 59// Represents the VHAL health check information. 60message VhalHealthCheckInfo { 61 enum CachingProgressState { 62 CACHING_PROGRESS_STATE_UNSPECIFIED = 0; 63 IN_PROGRESS = 1; 64 SUCCESS = 2; 65 FAILURE = 3; 66 } 67 68 optional bool is_enabled = 1; 69 optional int64 health_check_window_millis = 2; 70 optional int64 last_heartbeat_update_ago_millis = 3; 71 optional bool is_client_registered = 4; 72 optional CachingProgressState pid_caching_progress_state = 5; 73 optional int32 pid = 6; 74 optional int64 start_time_millis = 7; 75} 76