• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: 24
25  message Node {
26    // Global context
27    optional int64 node_parent_id = 1;
28    optional int64 node_id = 2;
29    optional int64 ts = 3;
30    optional int64 dur = 4;
31    optional string process_name = 14;
32    optional uint32 pid = 23;
33    optional uint32 waiter_count = 11;
34    repeated ThreadStateBreakdown thread_states = 19;
35    repeated BlockedFunctionBreakdown blocked_functions = 20;
36
37    // Blocking context
38    optional string blocking_method = 5;
39    optional string short_blocking_method = 7;
40    optional string blocking_src = 9;
41    optional string blocking_thread_name = 13;
42    optional bool is_blocking_thread_main = 16;
43    optional uint32 blocking_thread_tid = 22;
44
45    // Blocked context
46    optional string blocked_method = 6;
47    optional string short_blocked_method = 8;
48    optional string blocked_src = 10;
49    optional string blocked_thread_name = 12;
50    optional bool is_blocked_thread_main = 15;
51    optional uint32 blocked_thread_tid = 21;
52
53    // Binder context
54    optional int64 binder_reply_ts = 17;
55    optional uint32 binder_reply_tid = 18;
56  }
57
58  message ThreadStateBreakdown {
59    optional string thread_state = 1;
60    optional int64 thread_state_dur = 2;
61    optional int64 thread_state_count = 3;
62  }
63
64  message BlockedFunctionBreakdown {
65    optional string blocked_function = 1;
66    optional int64 blocked_function_dur = 2;
67    optional int64 blocked_function_count = 3;
68  }
69
70  repeated Node node = 1;
71}
72