1 // Copyright (C) 2022 The Android Open Source Project 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef INCLUDE_PERFETTO_TRACE_PROCESSOR_METATRACE_CONFIG_H_ 16 #define INCLUDE_PERFETTO_TRACE_PROCESSOR_METATRACE_CONFIG_H_ 17 18 #include <cstddef> 19 20 namespace perfetto { 21 namespace trace_processor { 22 namespace metatrace { 23 24 enum MetatraceCategories { 25 TOPLEVEL = 1 << 0, 26 QUERY = 1 << 1, 27 FUNCTION = 1 << 2, 28 29 NONE = 0, 30 ALL = TOPLEVEL | QUERY | FUNCTION, 31 }; 32 33 struct MetatraceConfig { 34 MetatraceConfig(); 35 36 MetatraceCategories categories = MetatraceCategories::ALL; 37 // Requested buffer size. The implemenation may choose to allocate a larger 38 // buffer size for efficiency. 39 size_t override_buffer_size = 0; 40 }; 41 42 } // namespace metatrace 43 } // namespace trace_processor 44 } // namespace perfetto 45 46 #endif // INCLUDE_PERFETTO_TRACE_PROCESSOR_METATRACE_CONFIG_H_ 47