• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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 
17 /*******************************************************************************
18  * AUTOGENERATED - DO NOT EDIT
19  *******************************************************************************
20  * This file has been generated from the protobuf message
21  * perfetto/config/trace_config.proto
22  * by
23  * ../../tools/proto_to_cpp/proto_to_cpp.cc.
24  * If you need to make changes here, change the .proto file and then run
25  * ./tools/gen_tracing_cpp_headers_from_protos
26  */
27 
28 #ifndef INCLUDE_PERFETTO_TRACING_CORE_TRACE_CONFIG_H_
29 #define INCLUDE_PERFETTO_TRACING_CORE_TRACE_CONFIG_H_
30 
31 #include <stdint.h>
32 #include <string>
33 #include <type_traits>
34 #include <vector>
35 
36 #include "perfetto/base/export.h"
37 
38 #include "perfetto/tracing/core/data_source_config.h"
39 
40 // Forward declarations for protobuf types.
41 namespace perfetto {
42 namespace protos {
43 class TraceConfig;
44 class TraceConfig_BufferConfig;
45 class TraceConfig_DataSource;
46 class DataSourceConfig;
47 class FtraceConfig;
48 class ChromeConfig;
49 class InodeFileConfig;
50 class InodeFileConfig_MountPointMappingEntry;
51 class ProcessStatsConfig;
52 class SysStatsConfig;
53 class HeapprofdConfig;
54 class HeapprofdConfig_ContinuousDumpConfig;
55 class AndroidPowerConfig;
56 class AndroidLogConfig;
57 class PackagesListConfig;
58 class TestConfig;
59 class TestConfig_DummyFields;
60 class TraceConfig_BuiltinDataSource;
61 class TraceConfig_ProducerConfig;
62 class TraceConfig_StatsdMetadata;
63 class TraceConfig_GuardrailOverrides;
64 class TraceConfig_TriggerConfig;
65 class TraceConfig_TriggerConfig_Trigger;
66 class TraceConfig_IncrementalStateConfig;
67 class TraceConfig_IncidentReportConfig;
68 }  // namespace protos
69 }  // namespace perfetto
70 
71 namespace perfetto {
72 
73 class PERFETTO_EXPORT TraceConfig {
74  public:
75   class PERFETTO_EXPORT BufferConfig {
76    public:
77     enum FillPolicy {
78       UNSPECIFIED = 0,
79       RING_BUFFER = 1,
80       DISCARD = 2,
81     };
82     BufferConfig();
83     ~BufferConfig();
84     BufferConfig(BufferConfig&&) noexcept;
85     BufferConfig& operator=(BufferConfig&&);
86     BufferConfig(const BufferConfig&);
87     BufferConfig& operator=(const BufferConfig&);
88     bool operator==(const BufferConfig&) const;
89     bool operator!=(const BufferConfig& other) const {
90       return !(*this == other);
91     }
92 
93     // Conversion methods from/to the corresponding protobuf types.
94     void FromProto(const perfetto::protos::TraceConfig_BufferConfig&);
95     void ToProto(perfetto::protos::TraceConfig_BufferConfig*) const;
96 
size_kb()97     uint32_t size_kb() const { return size_kb_; }
set_size_kb(uint32_t value)98     void set_size_kb(uint32_t value) { size_kb_ = value; }
99 
fill_policy()100     FillPolicy fill_policy() const { return fill_policy_; }
set_fill_policy(FillPolicy value)101     void set_fill_policy(FillPolicy value) { fill_policy_ = value; }
102 
103    private:
104     uint32_t size_kb_ = {};
105     FillPolicy fill_policy_ = {};
106 
107     // Allows to preserve unknown protobuf fields for compatibility
108     // with future versions of .proto files.
109     std::string unknown_fields_;
110   };
111 
112   class PERFETTO_EXPORT DataSource {
113    public:
114     DataSource();
115     ~DataSource();
116     DataSource(DataSource&&) noexcept;
117     DataSource& operator=(DataSource&&);
118     DataSource(const DataSource&);
119     DataSource& operator=(const DataSource&);
120     bool operator==(const DataSource&) const;
121     bool operator!=(const DataSource& other) const { return !(*this == other); }
122 
123     // Conversion methods from/to the corresponding protobuf types.
124     void FromProto(const perfetto::protos::TraceConfig_DataSource&);
125     void ToProto(perfetto::protos::TraceConfig_DataSource*) const;
126 
config()127     const DataSourceConfig& config() const { return config_; }
mutable_config()128     DataSourceConfig* mutable_config() { return &config_; }
129 
producer_name_filter_size()130     int producer_name_filter_size() const {
131       return static_cast<int>(producer_name_filter_.size());
132     }
producer_name_filter()133     const std::vector<std::string>& producer_name_filter() const {
134       return producer_name_filter_;
135     }
mutable_producer_name_filter()136     std::vector<std::string>* mutable_producer_name_filter() {
137       return &producer_name_filter_;
138     }
clear_producer_name_filter()139     void clear_producer_name_filter() { producer_name_filter_.clear(); }
add_producer_name_filter()140     std::string* add_producer_name_filter() {
141       producer_name_filter_.emplace_back();
142       return &producer_name_filter_.back();
143     }
144 
145    private:
146     DataSourceConfig config_ = {};
147     std::vector<std::string> producer_name_filter_;
148 
149     // Allows to preserve unknown protobuf fields for compatibility
150     // with future versions of .proto files.
151     std::string unknown_fields_;
152   };
153 
154   class PERFETTO_EXPORT BuiltinDataSource {
155    public:
156     BuiltinDataSource();
157     ~BuiltinDataSource();
158     BuiltinDataSource(BuiltinDataSource&&) noexcept;
159     BuiltinDataSource& operator=(BuiltinDataSource&&);
160     BuiltinDataSource(const BuiltinDataSource&);
161     BuiltinDataSource& operator=(const BuiltinDataSource&);
162     bool operator==(const BuiltinDataSource&) const;
163     bool operator!=(const BuiltinDataSource& other) const {
164       return !(*this == other);
165     }
166 
167     // Conversion methods from/to the corresponding protobuf types.
168     void FromProto(const perfetto::protos::TraceConfig_BuiltinDataSource&);
169     void ToProto(perfetto::protos::TraceConfig_BuiltinDataSource*) const;
170 
disable_clock_snapshotting()171     bool disable_clock_snapshotting() const {
172       return disable_clock_snapshotting_;
173     }
set_disable_clock_snapshotting(bool value)174     void set_disable_clock_snapshotting(bool value) {
175       disable_clock_snapshotting_ = value;
176     }
177 
disable_trace_config()178     bool disable_trace_config() const { return disable_trace_config_; }
set_disable_trace_config(bool value)179     void set_disable_trace_config(bool value) { disable_trace_config_ = value; }
180 
disable_system_info()181     bool disable_system_info() const { return disable_system_info_; }
set_disable_system_info(bool value)182     void set_disable_system_info(bool value) { disable_system_info_ = value; }
183 
184    private:
185     bool disable_clock_snapshotting_ = {};
186     bool disable_trace_config_ = {};
187     bool disable_system_info_ = {};
188 
189     // Allows to preserve unknown protobuf fields for compatibility
190     // with future versions of .proto files.
191     std::string unknown_fields_;
192   };
193 
194   enum LockdownModeOperation {
195     LOCKDOWN_UNCHANGED = 0,
196     LOCKDOWN_CLEAR = 1,
197     LOCKDOWN_SET = 2,
198   };
199 
200   class PERFETTO_EXPORT ProducerConfig {
201    public:
202     ProducerConfig();
203     ~ProducerConfig();
204     ProducerConfig(ProducerConfig&&) noexcept;
205     ProducerConfig& operator=(ProducerConfig&&);
206     ProducerConfig(const ProducerConfig&);
207     ProducerConfig& operator=(const ProducerConfig&);
208     bool operator==(const ProducerConfig&) const;
209     bool operator!=(const ProducerConfig& other) const {
210       return !(*this == other);
211     }
212 
213     // Conversion methods from/to the corresponding protobuf types.
214     void FromProto(const perfetto::protos::TraceConfig_ProducerConfig&);
215     void ToProto(perfetto::protos::TraceConfig_ProducerConfig*) const;
216 
producer_name()217     const std::string& producer_name() const { return producer_name_; }
set_producer_name(const std::string & value)218     void set_producer_name(const std::string& value) { producer_name_ = value; }
219 
shm_size_kb()220     uint32_t shm_size_kb() const { return shm_size_kb_; }
set_shm_size_kb(uint32_t value)221     void set_shm_size_kb(uint32_t value) { shm_size_kb_ = value; }
222 
page_size_kb()223     uint32_t page_size_kb() const { return page_size_kb_; }
set_page_size_kb(uint32_t value)224     void set_page_size_kb(uint32_t value) { page_size_kb_ = value; }
225 
226    private:
227     std::string producer_name_ = {};
228     uint32_t shm_size_kb_ = {};
229     uint32_t page_size_kb_ = {};
230 
231     // Allows to preserve unknown protobuf fields for compatibility
232     // with future versions of .proto files.
233     std::string unknown_fields_;
234   };
235 
236   class PERFETTO_EXPORT StatsdMetadata {
237    public:
238     StatsdMetadata();
239     ~StatsdMetadata();
240     StatsdMetadata(StatsdMetadata&&) noexcept;
241     StatsdMetadata& operator=(StatsdMetadata&&);
242     StatsdMetadata(const StatsdMetadata&);
243     StatsdMetadata& operator=(const StatsdMetadata&);
244     bool operator==(const StatsdMetadata&) const;
245     bool operator!=(const StatsdMetadata& other) const {
246       return !(*this == other);
247     }
248 
249     // Conversion methods from/to the corresponding protobuf types.
250     void FromProto(const perfetto::protos::TraceConfig_StatsdMetadata&);
251     void ToProto(perfetto::protos::TraceConfig_StatsdMetadata*) const;
252 
triggering_alert_id()253     int64_t triggering_alert_id() const { return triggering_alert_id_; }
set_triggering_alert_id(int64_t value)254     void set_triggering_alert_id(int64_t value) {
255       triggering_alert_id_ = value;
256     }
257 
triggering_config_uid()258     int32_t triggering_config_uid() const { return triggering_config_uid_; }
set_triggering_config_uid(int32_t value)259     void set_triggering_config_uid(int32_t value) {
260       triggering_config_uid_ = value;
261     }
262 
triggering_config_id()263     int64_t triggering_config_id() const { return triggering_config_id_; }
set_triggering_config_id(int64_t value)264     void set_triggering_config_id(int64_t value) {
265       triggering_config_id_ = value;
266     }
267 
triggering_subscription_id()268     int64_t triggering_subscription_id() const {
269       return triggering_subscription_id_;
270     }
set_triggering_subscription_id(int64_t value)271     void set_triggering_subscription_id(int64_t value) {
272       triggering_subscription_id_ = value;
273     }
274 
275    private:
276     int64_t triggering_alert_id_ = {};
277     int32_t triggering_config_uid_ = {};
278     int64_t triggering_config_id_ = {};
279     int64_t triggering_subscription_id_ = {};
280 
281     // Allows to preserve unknown protobuf fields for compatibility
282     // with future versions of .proto files.
283     std::string unknown_fields_;
284   };
285 
286   class PERFETTO_EXPORT GuardrailOverrides {
287    public:
288     GuardrailOverrides();
289     ~GuardrailOverrides();
290     GuardrailOverrides(GuardrailOverrides&&) noexcept;
291     GuardrailOverrides& operator=(GuardrailOverrides&&);
292     GuardrailOverrides(const GuardrailOverrides&);
293     GuardrailOverrides& operator=(const GuardrailOverrides&);
294     bool operator==(const GuardrailOverrides&) const;
295     bool operator!=(const GuardrailOverrides& other) const {
296       return !(*this == other);
297     }
298 
299     // Conversion methods from/to the corresponding protobuf types.
300     void FromProto(const perfetto::protos::TraceConfig_GuardrailOverrides&);
301     void ToProto(perfetto::protos::TraceConfig_GuardrailOverrides*) const;
302 
max_upload_per_day_bytes()303     uint64_t max_upload_per_day_bytes() const {
304       return max_upload_per_day_bytes_;
305     }
set_max_upload_per_day_bytes(uint64_t value)306     void set_max_upload_per_day_bytes(uint64_t value) {
307       max_upload_per_day_bytes_ = value;
308     }
309 
310    private:
311     uint64_t max_upload_per_day_bytes_ = {};
312 
313     // Allows to preserve unknown protobuf fields for compatibility
314     // with future versions of .proto files.
315     std::string unknown_fields_;
316   };
317 
318   class PERFETTO_EXPORT TriggerConfig {
319    public:
320     enum TriggerMode {
321       UNSPECIFIED = 0,
322       START_TRACING = 1,
323       STOP_TRACING = 2,
324     };
325 
326     class PERFETTO_EXPORT Trigger {
327      public:
328       Trigger();
329       ~Trigger();
330       Trigger(Trigger&&) noexcept;
331       Trigger& operator=(Trigger&&);
332       Trigger(const Trigger&);
333       Trigger& operator=(const Trigger&);
334       bool operator==(const Trigger&) const;
335       bool operator!=(const Trigger& other) const { return !(*this == other); }
336 
337       // Conversion methods from/to the corresponding protobuf types.
338       void FromProto(
339           const perfetto::protos::TraceConfig_TriggerConfig_Trigger&);
340       void ToProto(perfetto::protos::TraceConfig_TriggerConfig_Trigger*) const;
341 
name()342       const std::string& name() const { return name_; }
set_name(const std::string & value)343       void set_name(const std::string& value) { name_ = value; }
344 
producer_name_regex()345       const std::string& producer_name_regex() const {
346         return producer_name_regex_;
347       }
set_producer_name_regex(const std::string & value)348       void set_producer_name_regex(const std::string& value) {
349         producer_name_regex_ = value;
350       }
351 
stop_delay_ms()352       uint32_t stop_delay_ms() const { return stop_delay_ms_; }
set_stop_delay_ms(uint32_t value)353       void set_stop_delay_ms(uint32_t value) { stop_delay_ms_ = value; }
354 
355      private:
356       std::string name_ = {};
357       std::string producer_name_regex_ = {};
358       uint32_t stop_delay_ms_ = {};
359 
360       // Allows to preserve unknown protobuf fields for compatibility
361       // with future versions of .proto files.
362       std::string unknown_fields_;
363     };
364 
365     TriggerConfig();
366     ~TriggerConfig();
367     TriggerConfig(TriggerConfig&&) noexcept;
368     TriggerConfig& operator=(TriggerConfig&&);
369     TriggerConfig(const TriggerConfig&);
370     TriggerConfig& operator=(const TriggerConfig&);
371     bool operator==(const TriggerConfig&) const;
372     bool operator!=(const TriggerConfig& other) const {
373       return !(*this == other);
374     }
375 
376     // Conversion methods from/to the corresponding protobuf types.
377     void FromProto(const perfetto::protos::TraceConfig_TriggerConfig&);
378     void ToProto(perfetto::protos::TraceConfig_TriggerConfig*) const;
379 
trigger_mode()380     TriggerMode trigger_mode() const { return trigger_mode_; }
set_trigger_mode(TriggerMode value)381     void set_trigger_mode(TriggerMode value) { trigger_mode_ = value; }
382 
triggers_size()383     int triggers_size() const { return static_cast<int>(triggers_.size()); }
triggers()384     const std::vector<Trigger>& triggers() const { return triggers_; }
mutable_triggers()385     std::vector<Trigger>* mutable_triggers() { return &triggers_; }
clear_triggers()386     void clear_triggers() { triggers_.clear(); }
add_triggers()387     Trigger* add_triggers() {
388       triggers_.emplace_back();
389       return &triggers_.back();
390     }
391 
trigger_timeout_ms()392     uint32_t trigger_timeout_ms() const { return trigger_timeout_ms_; }
set_trigger_timeout_ms(uint32_t value)393     void set_trigger_timeout_ms(uint32_t value) { trigger_timeout_ms_ = value; }
394 
395    private:
396     TriggerMode trigger_mode_ = {};
397     std::vector<Trigger> triggers_;
398     uint32_t trigger_timeout_ms_ = {};
399 
400     // Allows to preserve unknown protobuf fields for compatibility
401     // with future versions of .proto files.
402     std::string unknown_fields_;
403   };
404 
405   class PERFETTO_EXPORT IncrementalStateConfig {
406    public:
407     IncrementalStateConfig();
408     ~IncrementalStateConfig();
409     IncrementalStateConfig(IncrementalStateConfig&&) noexcept;
410     IncrementalStateConfig& operator=(IncrementalStateConfig&&);
411     IncrementalStateConfig(const IncrementalStateConfig&);
412     IncrementalStateConfig& operator=(const IncrementalStateConfig&);
413     bool operator==(const IncrementalStateConfig&) const;
414     bool operator!=(const IncrementalStateConfig& other) const {
415       return !(*this == other);
416     }
417 
418     // Conversion methods from/to the corresponding protobuf types.
419     void FromProto(const perfetto::protos::TraceConfig_IncrementalStateConfig&);
420     void ToProto(perfetto::protos::TraceConfig_IncrementalStateConfig*) const;
421 
clear_period_ms()422     uint32_t clear_period_ms() const { return clear_period_ms_; }
set_clear_period_ms(uint32_t value)423     void set_clear_period_ms(uint32_t value) { clear_period_ms_ = value; }
424 
425    private:
426     uint32_t clear_period_ms_ = {};
427 
428     // Allows to preserve unknown protobuf fields for compatibility
429     // with future versions of .proto files.
430     std::string unknown_fields_;
431   };
432 
433   enum CompressionType {
434     COMPRESSION_TYPE_UNSPECIFIED = 0,
435     COMPRESSION_TYPE_DEFLATE = 1,
436   };
437 
438   class PERFETTO_EXPORT IncidentReportConfig {
439    public:
440     IncidentReportConfig();
441     ~IncidentReportConfig();
442     IncidentReportConfig(IncidentReportConfig&&) noexcept;
443     IncidentReportConfig& operator=(IncidentReportConfig&&);
444     IncidentReportConfig(const IncidentReportConfig&);
445     IncidentReportConfig& operator=(const IncidentReportConfig&);
446     bool operator==(const IncidentReportConfig&) const;
447     bool operator!=(const IncidentReportConfig& other) const {
448       return !(*this == other);
449     }
450 
451     // Conversion methods from/to the corresponding protobuf types.
452     void FromProto(const perfetto::protos::TraceConfig_IncidentReportConfig&);
453     void ToProto(perfetto::protos::TraceConfig_IncidentReportConfig*) const;
454 
destination_package()455     const std::string& destination_package() const {
456       return destination_package_;
457     }
set_destination_package(const std::string & value)458     void set_destination_package(const std::string& value) {
459       destination_package_ = value;
460     }
461 
destination_class()462     const std::string& destination_class() const { return destination_class_; }
set_destination_class(const std::string & value)463     void set_destination_class(const std::string& value) {
464       destination_class_ = value;
465     }
466 
privacy_level()467     int32_t privacy_level() const { return privacy_level_; }
set_privacy_level(int32_t value)468     void set_privacy_level(int32_t value) { privacy_level_ = value; }
469 
skip_dropbox()470     bool skip_dropbox() const { return skip_dropbox_; }
set_skip_dropbox(bool value)471     void set_skip_dropbox(bool value) { skip_dropbox_ = value; }
472 
473    private:
474     std::string destination_package_ = {};
475     std::string destination_class_ = {};
476     int32_t privacy_level_ = {};
477     bool skip_dropbox_ = {};
478 
479     // Allows to preserve unknown protobuf fields for compatibility
480     // with future versions of .proto files.
481     std::string unknown_fields_;
482   };
483 
484   TraceConfig();
485   ~TraceConfig();
486   TraceConfig(TraceConfig&&) noexcept;
487   TraceConfig& operator=(TraceConfig&&);
488   TraceConfig(const TraceConfig&);
489   TraceConfig& operator=(const TraceConfig&);
490   bool operator==(const TraceConfig&) const;
491   bool operator!=(const TraceConfig& other) const { return !(*this == other); }
492 
493   // Conversion methods from/to the corresponding protobuf types.
494   void FromProto(const perfetto::protos::TraceConfig&);
495   void ToProto(perfetto::protos::TraceConfig*) const;
496 
buffers_size()497   int buffers_size() const { return static_cast<int>(buffers_.size()); }
buffers()498   const std::vector<BufferConfig>& buffers() const { return buffers_; }
mutable_buffers()499   std::vector<BufferConfig>* mutable_buffers() { return &buffers_; }
clear_buffers()500   void clear_buffers() { buffers_.clear(); }
add_buffers()501   BufferConfig* add_buffers() {
502     buffers_.emplace_back();
503     return &buffers_.back();
504   }
505 
data_sources_size()506   int data_sources_size() const {
507     return static_cast<int>(data_sources_.size());
508   }
data_sources()509   const std::vector<DataSource>& data_sources() const { return data_sources_; }
mutable_data_sources()510   std::vector<DataSource>* mutable_data_sources() { return &data_sources_; }
clear_data_sources()511   void clear_data_sources() { data_sources_.clear(); }
add_data_sources()512   DataSource* add_data_sources() {
513     data_sources_.emplace_back();
514     return &data_sources_.back();
515   }
516 
builtin_data_sources()517   const BuiltinDataSource& builtin_data_sources() const {
518     return builtin_data_sources_;
519   }
mutable_builtin_data_sources()520   BuiltinDataSource* mutable_builtin_data_sources() {
521     return &builtin_data_sources_;
522   }
523 
duration_ms()524   uint32_t duration_ms() const { return duration_ms_; }
set_duration_ms(uint32_t value)525   void set_duration_ms(uint32_t value) { duration_ms_ = value; }
526 
enable_extra_guardrails()527   bool enable_extra_guardrails() const { return enable_extra_guardrails_; }
set_enable_extra_guardrails(bool value)528   void set_enable_extra_guardrails(bool value) {
529     enable_extra_guardrails_ = value;
530   }
531 
lockdown_mode()532   LockdownModeOperation lockdown_mode() const { return lockdown_mode_; }
set_lockdown_mode(LockdownModeOperation value)533   void set_lockdown_mode(LockdownModeOperation value) {
534     lockdown_mode_ = value;
535   }
536 
producers_size()537   int producers_size() const { return static_cast<int>(producers_.size()); }
producers()538   const std::vector<ProducerConfig>& producers() const { return producers_; }
mutable_producers()539   std::vector<ProducerConfig>* mutable_producers() { return &producers_; }
clear_producers()540   void clear_producers() { producers_.clear(); }
add_producers()541   ProducerConfig* add_producers() {
542     producers_.emplace_back();
543     return &producers_.back();
544   }
545 
statsd_metadata()546   const StatsdMetadata& statsd_metadata() const { return statsd_metadata_; }
mutable_statsd_metadata()547   StatsdMetadata* mutable_statsd_metadata() { return &statsd_metadata_; }
548 
write_into_file()549   bool write_into_file() const { return write_into_file_; }
set_write_into_file(bool value)550   void set_write_into_file(bool value) { write_into_file_ = value; }
551 
file_write_period_ms()552   uint32_t file_write_period_ms() const { return file_write_period_ms_; }
set_file_write_period_ms(uint32_t value)553   void set_file_write_period_ms(uint32_t value) {
554     file_write_period_ms_ = value;
555   }
556 
max_file_size_bytes()557   uint64_t max_file_size_bytes() const { return max_file_size_bytes_; }
set_max_file_size_bytes(uint64_t value)558   void set_max_file_size_bytes(uint64_t value) { max_file_size_bytes_ = value; }
559 
guardrail_overrides()560   const GuardrailOverrides& guardrail_overrides() const {
561     return guardrail_overrides_;
562   }
mutable_guardrail_overrides()563   GuardrailOverrides* mutable_guardrail_overrides() {
564     return &guardrail_overrides_;
565   }
566 
deferred_start()567   bool deferred_start() const { return deferred_start_; }
set_deferred_start(bool value)568   void set_deferred_start(bool value) { deferred_start_ = value; }
569 
flush_period_ms()570   uint32_t flush_period_ms() const { return flush_period_ms_; }
set_flush_period_ms(uint32_t value)571   void set_flush_period_ms(uint32_t value) { flush_period_ms_ = value; }
572 
flush_timeout_ms()573   uint32_t flush_timeout_ms() const { return flush_timeout_ms_; }
set_flush_timeout_ms(uint32_t value)574   void set_flush_timeout_ms(uint32_t value) { flush_timeout_ms_ = value; }
575 
notify_traceur()576   bool notify_traceur() const { return notify_traceur_; }
set_notify_traceur(bool value)577   void set_notify_traceur(bool value) { notify_traceur_ = value; }
578 
trigger_config()579   const TriggerConfig& trigger_config() const { return trigger_config_; }
mutable_trigger_config()580   TriggerConfig* mutable_trigger_config() { return &trigger_config_; }
581 
activate_triggers_size()582   int activate_triggers_size() const {
583     return static_cast<int>(activate_triggers_.size());
584   }
activate_triggers()585   const std::vector<std::string>& activate_triggers() const {
586     return activate_triggers_;
587   }
mutable_activate_triggers()588   std::vector<std::string>* mutable_activate_triggers() {
589     return &activate_triggers_;
590   }
clear_activate_triggers()591   void clear_activate_triggers() { activate_triggers_.clear(); }
add_activate_triggers()592   std::string* add_activate_triggers() {
593     activate_triggers_.emplace_back();
594     return &activate_triggers_.back();
595   }
596 
incremental_state_config()597   const IncrementalStateConfig& incremental_state_config() const {
598     return incremental_state_config_;
599   }
mutable_incremental_state_config()600   IncrementalStateConfig* mutable_incremental_state_config() {
601     return &incremental_state_config_;
602   }
603 
allow_user_build_tracing()604   bool allow_user_build_tracing() const { return allow_user_build_tracing_; }
set_allow_user_build_tracing(bool value)605   void set_allow_user_build_tracing(bool value) {
606     allow_user_build_tracing_ = value;
607   }
608 
unique_session_name()609   const std::string& unique_session_name() const {
610     return unique_session_name_;
611   }
set_unique_session_name(const std::string & value)612   void set_unique_session_name(const std::string& value) {
613     unique_session_name_ = value;
614   }
615 
compression_type()616   CompressionType compression_type() const { return compression_type_; }
set_compression_type(CompressionType value)617   void set_compression_type(CompressionType value) {
618     compression_type_ = value;
619   }
620 
incident_report_config()621   const IncidentReportConfig& incident_report_config() const {
622     return incident_report_config_;
623   }
mutable_incident_report_config()624   IncidentReportConfig* mutable_incident_report_config() {
625     return &incident_report_config_;
626   }
627 
628  private:
629   std::vector<BufferConfig> buffers_;
630   std::vector<DataSource> data_sources_;
631   BuiltinDataSource builtin_data_sources_ = {};
632   uint32_t duration_ms_ = {};
633   bool enable_extra_guardrails_ = {};
634   LockdownModeOperation lockdown_mode_ = {};
635   std::vector<ProducerConfig> producers_;
636   StatsdMetadata statsd_metadata_ = {};
637   bool write_into_file_ = {};
638   uint32_t file_write_period_ms_ = {};
639   uint64_t max_file_size_bytes_ = {};
640   GuardrailOverrides guardrail_overrides_ = {};
641   bool deferred_start_ = {};
642   uint32_t flush_period_ms_ = {};
643   uint32_t flush_timeout_ms_ = {};
644   bool notify_traceur_ = {};
645   TriggerConfig trigger_config_ = {};
646   std::vector<std::string> activate_triggers_;
647   IncrementalStateConfig incremental_state_config_ = {};
648   bool allow_user_build_tracing_ = {};
649   std::string unique_session_name_ = {};
650   CompressionType compression_type_ = {};
651   IncidentReportConfig incident_report_config_ = {};
652 
653   // Allows to preserve unknown protobuf fields for compatibility
654   // with future versions of .proto files.
655   std::string unknown_fields_;
656 };
657 
658 }  // namespace perfetto
659 
660 #endif  // INCLUDE_PERFETTO_TRACING_CORE_TRACE_CONFIG_H_
661