• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2025 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
21message KernelWakelockData {
22  message Wakelock {
23    enum Type {
24      WAKELOCK_TYPE_UNKNOWN = 0;
25      WAKELOCK_TYPE_KERNEL = 1;
26      WAKELOCK_TYPE_NATIVE = 2;
27    }
28
29    // Interning id.
30    optional uint32 wakelock_id = 1;
31
32    // Name of the wakelock.
33    optional string wakelock_name = 2;
34
35    // Type of the wakelock. We record data about both true kernel wakelocks
36    // and "native" wakelocks which are taken in userspace but are more
37    // conceptually similar to kernel wakelocks than normal userspace ones.
38    optional Type wakelock_type = 3;
39  }
40
41  // This is only emitted when we encounter new wakelocks.
42  repeated Wakelock wakelock = 1;
43
44  // Interning id.
45  repeated uint32 wakelock_id = 2 [packed = true];
46
47  // If we interned the wakelock name in this packet, this is the total time
48  // the wakelock has been held.
49  // If not, it's a delta from the last time we saw it.
50  repeated uint64 time_held_millis = 3 [packed = true];
51}
52