1/* 2 * Copyright (C) 2020 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 TrackEventConfig { 22 // The following fields define the set of enabled trace categories. Each list 23 // item is a glob. 24 // 25 // To determine if category is enabled, it is checked against the filters in 26 // the following order: 27 // 28 // 1. Exact matches in enabled categories. 29 // 2. Exact matches in enabled tags. 30 // 3. Exact matches in disabled categories. 31 // 4. Exact matches in disabled tags. 32 // 5. Pattern matches in enabled categories. 33 // 6. Pattern matches in enabled tags. 34 // 7. Pattern matches in disabled categories. 35 // 8. Pattern matches in disabled tags. 36 // 37 // If none of the steps produced a match: 38 // - In the C++ SDK (`perfetto::Category`), categories are enabled by 39 // default. 40 // - In the C SDK (`PerfettoTeCategory`), categories are disabled by default. 41 // 42 // Examples: 43 // 44 // - To enable all non-slow/debug categories: 45 // 46 // enabled_categories: "*" 47 // 48 // - To enable specific categories: 49 // 50 // disabled_categories: "*" 51 // enabled_categories: "my_category" 52 // enabled_categories: "my_category2" 53 // 54 // - To enable only categories with a specific tag: 55 // 56 // disabled_tags: "*" 57 // enabled_tags: "my_tag" 58 // 59 60 // Default: [] 61 repeated string disabled_categories = 1; 62 63 // Default: [] 64 repeated string enabled_categories = 2; 65 66 // Default: ["slow", "debug"] 67 repeated string disabled_tags = 3; 68 69 // Default: [] 70 repeated string enabled_tags = 4; 71 72 // Default: false (i.e. enabled by default) 73 optional bool disable_incremental_timestamps = 5; 74 75 // Allows to specify a custom unit different than the default (ns). 76 // Also affects thread timestamps if enable_thread_time_sampling = true. 77 // A multiplier of 1000 means that a timestamp = 3 should be interpreted as 78 // 3000 ns = 3 us. 79 // Default: 1 (if unset, it should be read as 1). 80 optional uint64 timestamp_unit_multiplier = 6; 81 82 // Default: false (i.e. debug_annotations is NOT filtered out by default) 83 // When true, any debug annotations provided as arguments to the 84 // TRACE_EVENT macros are not written into the trace. Typed arguments will 85 // still be emitted even if set to true. 86 optional bool filter_debug_annotations = 7; 87 88 // Default : false (i.e. disabled) 89 // When true, the SDK samples and emits the current thread time counter value 90 // for each event on the current thread's track. This value represents the 91 // total CPU time consumed by that thread since its creation. Note that if a 92 // thread is not scheduled by OS for some duration, that time won't be 93 // included in thread_time. 94 // Learn more : "CLOCK_THREAD_CPUTIME_ID" flag at 95 // https://linux.die.net/man/3/clock_gettime 96 optional bool enable_thread_time_sampling = 8; 97 98 // Default: false (i.e. dynamic event names are NOT filtered out by default) 99 // When true, event_names wrapped in perfetto::DynamicString will be filtered 100 // out. 101 optional bool filter_dynamic_event_names = 9; 102} 103