1/* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package perfetto.protos; 20 21// measure max IRQ runtime and IRQ tasks running over threshold. 22message AndroidIrqRuntimeMetric { 23 message IrqSlice { 24 // IRQ name 25 optional string irq_name = 1; 26 // timestamp 27 optional int64 ts = 2; 28 // runtime of IRQ task 29 optional int64 dur = 3; 30 } 31 message ThresholdMetric { 32 // Threshold value 33 optional string threshold = 1; 34 // over threshold count 35 optional int64 over_threshold_count = 2; 36 // anomaly ratio (over threshold count / total count) 37 optional double anomaly_ratio= 3; 38 } 39 message IrqRuntimeMetric { 40 // max runtime of IRQ tasks 41 optional int64 max_runtime = 1; 42 // total IRQ tasks 43 optional int64 total_count = 2; 44 // over threshold metric 45 optional ThresholdMetric threshold_metric = 3; 46 // information for top 10 IRQ tasks 47 repeated IrqSlice longest_irq_slices = 4; 48 } 49 50 // metrics for hardirq and softirq 51 optional IrqRuntimeMetric hw_irq = 1; 52 optional IrqRuntimeMetric sw_irq = 2; 53} 54 55