xref: /aosp_15_r20/external/perfetto/protos/perfetto/metrics/android/monitor_contention_metric.proto (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
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// This metric provides information about the monitor contention graph in a
22// trace
23message AndroidMonitorContentionMetric {
24  // Next field id: 26
25  message Node {
26    // Global context
27    optional int64 node_parent_id = 1;
28    optional int64 node_child_id = 24;
29    optional int64 node_id = 2;
30    optional int64 ts = 3;
31    optional int64 dur = 4;
32    optional int64 monotonic_dur = 25;
33    optional string process_name = 14;
34    optional uint32 pid = 23;
35    optional uint32 waiter_count = 11;
36    repeated ThreadStateBreakdown thread_states = 19;
37    repeated BlockedFunctionBreakdown blocked_functions = 20;
38
39    // Blocking context
40    optional string blocking_method = 5;
41    optional string short_blocking_method = 7;
42    optional string blocking_src = 9;
43    optional string blocking_thread_name = 13;
44    optional bool is_blocking_thread_main = 16;
45    optional uint32 blocking_thread_tid = 22;
46
47    // Blocked context
48    optional string blocked_method = 6;
49    optional string short_blocked_method = 8;
50    optional string blocked_src = 10;
51    optional string blocked_thread_name = 12;
52    optional bool is_blocked_thread_main = 15;
53    optional uint32 blocked_thread_tid = 21;
54
55    // Binder context
56    optional int64 binder_reply_ts = 17;
57    optional uint32 binder_reply_tid = 18;
58  }
59
60  message ThreadStateBreakdown {
61    optional string thread_state = 1;
62    optional int64 thread_state_dur = 2;
63    optional int64 thread_state_count = 3;
64  }
65
66  message BlockedFunctionBreakdown {
67    optional string blocked_function = 1;
68    optional int64 blocked_function_dur = 2;
69    optional int64 blocked_function_count = 3;
70  }
71
72  repeated Node node = 1;
73}
74